fix(nvim): regex
This commit is contained in:
parent
ffa62aedfd
commit
d7e30ca465
@ -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")}
|
||||
|
@ -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";
|
||||
|
2
init.lua
2
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 = {
|
||||
|
4
rust.lua
4
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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user