home/nvim: remove debug lsp logging

This commit is contained in:
chayleaf 2023-03-15 19:14:37 +07:00
parent 9e2794ff5e
commit 15e7be9a24

View file

@ -246,11 +246,11 @@
silent ? true, silent ? true,
... ...
}: let }: let
opts''' = opts // { inherit noremap silent; }; opts'' = opts // { inherit noremap silent; };
opts' = lib.filterAttrs (k: v: opts' = lib.filterAttrs (k: v:
k != "keys" && k != "mode" && k != "lhs" && k != "rhs" && k != "desc" k != "keys" && k != "mode" && k != "lhs" && k != "rhs" && k != "desc"
# defaults to false # defaults to false
&& ((k != "silent" && k != "noremap") || (builtins.isBool v && v))) opts'''; && ((k != "silent" && k != "noremap") || (builtins.isBool v && v))) opts'';
in vim.keymap.set [ mode lhs rhs opts' ]; in vim.keymap.set [ mode lhs rhs opts' ];
keymapSetMulti = opts@{ keymapSetMulti = opts@{
keys, keys,
@ -287,6 +287,7 @@
nil nil
marksman marksman
taplo taplo
ripgrep
(python3.withPackages (p: with p; [ (python3.withPackages (p: with p; [
python-lsp-server python-lsp-server
pylsp-mypy pylsp-mypy
@ -612,27 +613,26 @@
(call on_attach [client bufnr]) (call on_attach [client bufnr])
]) ])
# BEGIN # BEGIN
(let lsp = { name, settings ? {} }: setupLsp name { (let lsp' = { name, settings ? {} }: setupLsp name {
inherit on_attach capabilities settings; inherit on_attach capabilities settings;
}; in (on_attach_rust: [ }; lsp = args: lsp' (if builtins.isString args then { name = args; } else args); in (on_attach_rust: [
(vim.lsp.set_log_level "debug") # (vim.lsp.set_log_level "debug")
] ++ [
(map lsp [ (map lsp [
# see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md # see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
{ name = "bashls"; } "bashls"
{ name = "clangd"; } "clangd"
# https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md # https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md
{ name = "pylsp"; settings = { { name = "pylsp"; settings = {
pylsp.plugins.pylsp_mypy.enabled = true; pylsp.plugins.pylsp_mypy.enabled = true;
}; } }; }
{ name = "svelte"; } "svelte"
{ name = "html"; } "html"
{ name = "cssls"; } "cssls"
{ name = "tsserver"; } "tsserver"
{ name = "jsonls"; } "jsonls"
{ name = "nil_ls"; } "nil_ls"
{ name = "taplo"; } "taplo"
{ name = "marksman"; } "marksman"
]) ])
(setupLsp "rust_analyzer" { (setupLsp "rust_analyzer" {
on_attach = on_attach_rust; on_attach = on_attach_rust;