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.
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")}

View File

@ -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";

View File

@ -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 = {

View File

@ -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"
}
}