feat(core): start on the clojure journey
Install all of the tools and config for clojure development. This adds the first configz module that is not yet properly integrated and automaticaly run with the `dotfiles` shell command.
This commit is contained in:
parent
894320aa4d
commit
3070940cd1
7 changed files with 47 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,7 +3,6 @@
|
|||
# Edit at https://www.toptal.com/developers/gitignore?templates=puppet,emacs,code,vim,linux
|
||||
|
||||
### Application ###
|
||||
modules
|
||||
.resource_types
|
||||
info.rb
|
||||
.rerun.json
|
||||
|
|
|
|||
36
modules/clojure.lua
Normal file
36
modules/clojure.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
-- Configz module for the clojure dev tools
|
||||
|
||||
local function install_clojure_lsp()
|
||||
configz.download("/tmp/closure-lsp.zip", {
|
||||
sha256 = "c23a5c9029b3a548a6b8e66a0662103c13e44f220ad8e3f97abf0b7c53a994b1",
|
||||
url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/2023.02.27-13.12.12/clojure-lsp-native-static-linux-amd64.zip",
|
||||
})
|
||||
|
||||
configz.run "cd /tmp; unzip /tmp/closure-lsp.zip"
|
||||
configz.file(os.getenv "HOME" .. "/.local/bin/clojure-lsp", { source = "/tmp/clojure-lsp" })
|
||||
end
|
||||
|
||||
local function has_correct_version(command, version)
|
||||
local ok, _ = configz.run(command .. " --version | grep " .. version)
|
||||
return ok
|
||||
end
|
||||
|
||||
local clojure_lsp_installed, clojure_lsp = configz.get_executable "clojure-lsp"
|
||||
if not clojure_lsp_installed or not has_correct_version(clojure_lsp, "2023.02.27-13.12.12") then
|
||||
install_clojure_lsp()
|
||||
end
|
||||
|
||||
local function install_babashka()
|
||||
configz.download("/tmp/babashka.tar.gz", {
|
||||
sha256 = "46c866c28ea9d99a5544c75c554b0c1e22edfa20843d927d3c175b7021ca7252",
|
||||
url = "https://github.com/babashka/babashka/releases/download/v1.3.176/babashka-1.3.176-linux-amd64.tar.gz",
|
||||
})
|
||||
|
||||
configz.run "cd /tmp; tar -xzf babashka.tar.gz"
|
||||
configz.file(os.getenv "HOME" .. "/.local/bin/bb", { source = "/tmp/bb" })
|
||||
end
|
||||
|
||||
local bb_installed, bb = configz.get_executable "bb"
|
||||
if not bb_installed or not has_correct_version(bb, "1.3.176") then
|
||||
install_babashka()
|
||||
end
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
" Set leader as space bar
|
||||
let mapleader="\<Space>"
|
||||
let maplocalleader="\<Space>"
|
||||
|
||||
" Use the system clipboard with yank and paste
|
||||
set clipboard=unnamedplus
|
||||
|
|
|
|||
|
|
@ -81,7 +81,12 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
|
|||
desc = "Lint the buffer",
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
lint.try_lint('cspell')
|
||||
-- Only try and run spell checking on buffers that have a filetype. This is
|
||||
-- mainly to disable spell checking in vim lsp popup buffers.
|
||||
if vim.bo.filetype ~= "" then
|
||||
lint.try_lint('cspell')
|
||||
end
|
||||
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ local servers = {
|
|||
},
|
||||
html = {},
|
||||
cssls = {},
|
||||
clojure_lsp = {},
|
||||
emmet_ls = {
|
||||
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "scss", "eruby" },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ require'nvim-treesitter.configs'.setup {
|
|||
additional_vim_regex_highlighting = true,
|
||||
},
|
||||
ensure_installed = {
|
||||
"typescript", "javascript", "tsx", "php", "html", "go", "org"
|
||||
"typescript", "javascript", "tsx", "php", "html", "go", "org", "clojure"
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class core::vim {
|
|||
'vim-tmux-navigator' => { url => 'https://github.com/christoomey/vim-tmux-navigator.git' },
|
||||
'vim-fugitive' => { url => 'https://github.com/tpope/vim-fugitive.git' },
|
||||
'vim-rhubarb' => { url => 'https://github.com/tpope/vim-rhubarb.git' },
|
||||
'conjure' => { url => 'https://github.com/Olical/conjure.git' }
|
||||
}
|
||||
|
||||
create_resources(core::vim::plugin_start, $plugins_start)
|
||||
|
|
|
|||
Loading…
Reference in a new issue