diff options
author | Minijackson <minijackson@riseup.net> | 2021-06-15 16:23:54 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2021-06-15 16:23:54 +0200 |
commit | 27d5fed11dca4b42b629921f1c14ca8bff16143b (patch) | |
tree | b18e9f468765bf21d58655de422daf0fd87c41d5 | |
parent | 1a827b1f16584a3983960971b02b8c9f173a738f (diff) | |
download | nixos-config-reborn-27d5fed11dca4b42b629921f1c14ca8bff16143b.tar.gz nixos-config-reborn-27d5fed11dca4b42b629921f1c14ca8bff16143b.zip |
vim-dev: specify commands for LSP + fix clangd resource-root
-rw-r--r-- | dotfiles/vim-dev.lua | 2 | ||||
-rw-r--r-- | usecases/desktop/development.nix | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/dotfiles/vim-dev.lua b/dotfiles/vim-dev.lua index d89a3bb..0422b2f 100644 --- a/dotfiles/vim-dev.lua +++ b/dotfiles/vim-dev.lua | |||
@@ -50,7 +50,7 @@ function setup_lsp_with(servers) | |||
50 | for _, server in ipairs(servers) do | 50 | for _, server in ipairs(servers) do |
51 | lspconfig[server].setup { | 51 | lspconfig[server].setup { |
52 | capabilities = capabilities, | 52 | capabilities = capabilities, |
53 | cmd = { vim.g[server .. "_path"] }, | 53 | cmd = vim.g[server .. "_cmd"], |
54 | on_attach = on_attach, | 54 | on_attach = on_attach, |
55 | } | 55 | } |
56 | end | 56 | end |
diff --git a/usecases/desktop/development.nix b/usecases/desktop/development.nix index d7ec8f5..a50ddb6 100644 --- a/usecases/desktop/development.nix +++ b/usecases/desktop/development.nix | |||
@@ -4,6 +4,7 @@ inputs: | |||
4 | 4 | ||
5 | let | 5 | let |
6 | inherit (pkgs.unstable) | 6 | inherit (pkgs.unstable) |
7 | clang | ||
7 | clang-tools | 8 | clang-tools |
8 | elixir_ls | 9 | elixir_ls |
9 | rust-analyzer-unwrapped | 10 | rust-analyzer-unwrapped |
@@ -33,11 +34,12 @@ in | |||
33 | ]; | 34 | ]; |
34 | luaConfig = builtins.readFile ../../dotfiles/vim-dev.lua; | 35 | luaConfig = builtins.readFile ../../dotfiles/vim-dev.lua; |
35 | 36 | ||
37 | # TODO: make this a NixOS module | ||
36 | variables = { | 38 | variables = { |
37 | clangd_path = "'${clang-tools}/bin/clangd'"; | 39 | clangd_cmd = "{ '${clang-tools}/bin/clangd', '--resource-dir=${clang}/resource-root' }"; |
38 | elixirls_path = "'${elixir_ls}/bin/elixir-ls'"; | 40 | elixirls_cmd = "{ '${elixir_ls}/bin/elixir-ls' }"; |
39 | pyls_path = "'${python-language-server}/bin/pyls'"; | 41 | pyls_cmd = "{ '${python-language-server}/bin/pyls' }"; |
40 | rust_analyzer_path = "'${rust-analyzer-unwrapped}/bin/rust-analyzer'"; | 42 | rust_analyzer_cmd = "{ '${rust-analyzer-unwrapped}/bin/rust-analyzer' }"; |
41 | }; | 43 | }; |
42 | }; | 44 | }; |
43 | 45 | ||