From 27d5fed11dca4b42b629921f1c14ca8bff16143b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 15 Jun 2021 16:23:54 +0200 Subject: vim-dev: specify commands for LSP + fix clangd resource-root --- dotfiles/vim-dev.lua | 2 +- 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) for _, server in ipairs(servers) do lspconfig[server].setup { capabilities = capabilities, - cmd = { vim.g[server .. "_path"] }, + cmd = vim.g[server .. "_cmd"], on_attach = on_attach, } 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: let inherit (pkgs.unstable) + clang clang-tools elixir_ls rust-analyzer-unwrapped @@ -33,11 +34,12 @@ in ]; luaConfig = builtins.readFile ../../dotfiles/vim-dev.lua; + # TODO: make this a NixOS module variables = { - clangd_path = "'${clang-tools}/bin/clangd'"; - elixirls_path = "'${elixir_ls}/bin/elixir-ls'"; - pyls_path = "'${python-language-server}/bin/pyls'"; - rust_analyzer_path = "'${rust-analyzer-unwrapped}/bin/rust-analyzer'"; + clangd_cmd = "{ '${clang-tools}/bin/clangd', '--resource-dir=${clang}/resource-root' }"; + elixirls_cmd = "{ '${elixir_ls}/bin/elixir-ls' }"; + pyls_cmd = "{ '${python-language-server}/bin/pyls' }"; + rust_analyzer_cmd = "{ '${rust-analyzer-unwrapped}/bin/rust-analyzer' }"; }; }; -- cgit v1.2.3