diff --git a/completion.lua b/completion.lua index a3c1329..d42ede6 100644 --- a/completion.lua +++ b/completion.lua @@ -99,14 +99,12 @@ vim.cmd(':set winhighlight=' .. cmp.config.window.bordered().winhighlight) -- Setup language servers. local lspconfig = require('lspconfig') local deps = require("nvim-deps") --- deps.typescript-language-server_path lspconfig.tsserver.setup({ cmd = { (deps["typescript-language-server_path"] .. "/bin/typescript-language-server"), "--stdio" } }) --- deps.clang-tools_path lspconfig.clangd.setup({cmd = {(deps["clang-tools_path"] .. "/bin/clangd")}}) lspconfig.bashls.setup({ cmd = {(deps["bash-language-server_path"] .. "/bin/bash-language-server")} diff --git a/default.nix b/default.nix index ac274d3..0e2ed06 100644 --- a/default.nix +++ b/default.nix @@ -74,7 +74,7 @@ in let out = builtins.readFile (pkgs.runCommandLocal "extract-deps" { nativeBuildInputs = [ pkgs.gnused ]; __contentAddressed = true; } '' - sed -nr 's/.*(deps\.(.*)_path|deps\["(.*)"\]).*/\2/p' ${file} | uniq > $out + sed -nr 's/.*(deps\["(.*)_path"\]).*/\2/p' ${file} | uniq > $out ''); names = lib.splitString "\n" out; in @@ -83,7 +83,7 @@ in lldb = pkgs.lldb; rust_analyzer = rust-analyzer; typst_lsp = pkgs.typst-lsp; - inherit (pkgs.nodePackages) typescript-language-server bash-language-server; + inherit (pkgs.nodePackages) typescript-language-server bash-language-server; }; pathsLua = pkgs.writeTextFile { name = "nvim-deps.lua"; diff --git a/init.lua b/init.lua index b5de8ec..ff18581 100644 --- a/init.lua +++ b/init.lua @@ -225,7 +225,7 @@ lspconfig.typst_lsp.setup { } } lspconfig.nil_ls.setup { - cmd = {(deps.nil_path .. "/bin/nil")}, + cmd = {(deps["nil_path"] .. "/bin/nil")}, -- https://github.com/oxalica/nil/blob/main/docs/configuration.md settings = { command = { diff --git a/rust.lua b/rust.lua index 0f6bb59..4eb6deb 100644 --- a/rust.lua +++ b/rust.lua @@ -114,7 +114,7 @@ vim.g.rustaceanvim = { -- standalone file support -- setting it to false may improve startup time standalone = true, - cmd = {(deps.rust_analyzer_path .. "/bin/rust-analyzer")}, + cmd = {(deps["rust_analyzer_path"] .. "/bin/rust-analyzer")}, capabilities = require("cmp_nvim_lsp").default_capabilities(c), on_attach = function(client, bufnr) require("lsp-inlayhints").on_attach(client, bufnr) @@ -159,7 +159,7 @@ vim.g.rustaceanvim = { dap = { adapter = { type = "executable", - command = deps.lldb_path .. "/bin/lldb-vscode", + command = deps["lldb_path"] .. "/bin/lldb-vscode", name = "rt_lldb" } }