fix(nvim): regex

This commit is contained in:
u2515h 2024-01-25 18:32:50 +01:00
parent ffa62aedfd
commit d7e30ca465
4 changed files with 5 additions and 7 deletions

View File

@ -99,14 +99,12 @@ vim.cmd(':set winhighlight=' .. cmp.config.window.bordered().winhighlight)
-- Setup language servers. -- Setup language servers.
local lspconfig = require('lspconfig') local lspconfig = require('lspconfig')
local deps = require("nvim-deps") local deps = require("nvim-deps")
-- deps.typescript-language-server_path
lspconfig.tsserver.setup({ lspconfig.tsserver.setup({
cmd = { cmd = {
(deps["typescript-language-server_path"] .. (deps["typescript-language-server_path"] ..
"/bin/typescript-language-server"), "--stdio" "/bin/typescript-language-server"), "--stdio"
} }
}) })
-- deps.clang-tools_path
lspconfig.clangd.setup({cmd = {(deps["clang-tools_path"] .. "/bin/clangd")}}) lspconfig.clangd.setup({cmd = {(deps["clang-tools_path"] .. "/bin/clangd")}})
lspconfig.bashls.setup({ lspconfig.bashls.setup({
cmd = {(deps["bash-language-server_path"] .. "/bin/bash-language-server")} cmd = {(deps["bash-language-server_path"] .. "/bin/bash-language-server")}

View File

@ -74,7 +74,7 @@ in
let let
out = builtins.readFile (pkgs.runCommandLocal "extract-deps" out = builtins.readFile (pkgs.runCommandLocal "extract-deps"
{ nativeBuildInputs = [ pkgs.gnused ]; __contentAddressed = true; } '' { 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; names = lib.splitString "\n" out;
in in

View File

@ -225,7 +225,7 @@ lspconfig.typst_lsp.setup {
} }
} }
lspconfig.nil_ls.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 -- https://github.com/oxalica/nil/blob/main/docs/configuration.md
settings = { settings = {
command = { command = {

View File

@ -114,7 +114,7 @@ vim.g.rustaceanvim = {
-- standalone file support -- standalone file support
-- setting it to false may improve startup time -- setting it to false may improve startup time
standalone = true, 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), capabilities = require("cmp_nvim_lsp").default_capabilities(c),
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
require("lsp-inlayhints").on_attach(client, bufnr) require("lsp-inlayhints").on_attach(client, bufnr)
@ -159,7 +159,7 @@ vim.g.rustaceanvim = {
dap = { dap = {
adapter = { adapter = {
type = "executable", type = "executable",
command = deps.lldb_path .. "/bin/lldb-vscode", command = deps["lldb_path"] .. "/bin/lldb-vscode",
name = "rt_lldb" name = "rt_lldb"
} }
} }