This commit is contained in:
1 parent
49f66cb9fa
commit
51c3ee2a40
3 files changed
+54
-42
No files matched your search
@@ -96,43 +96,42 @@ local servers = {
|
|||||||
},
|
},
|
||||||
tailwindcss = {},
|
tailwindcss = {},
|
||||||
ts_ls = {},
|
ts_ls = {},
|
||||||
-- vtsls = {
|
vtsls = {
|
||||||
-- maxTsServerMemory = 16384,
|
filetypes = {
|
||||||
-- filetypes = {
|
"javascript",
|
||||||
-- "javascript",
|
"javascriptreact",
|
||||||
-- "javascriptreact",
|
"javascript.jsx",
|
||||||
-- "javascript.jsx",
|
"typescript",
|
||||||
-- "typescript",
|
"typescriptreact",
|
||||||
-- "typescriptreact",
|
"typescript.tsx",
|
||||||
-- "typescript.tsx",
|
},
|
||||||
-- },
|
settings = {
|
||||||
-- settings = {
|
vtsls = {
|
||||||
-- complete_function_calls = true,
|
enableMoveToFileCodeAction = true,
|
||||||
-- vtsls = {
|
autoUseWorkspaceTsdk = true,
|
||||||
-- enableMoveToFileCodeAction = true,
|
experimental = {
|
||||||
-- autoUseWorkspaceTsdk = true,
|
completion = {
|
||||||
-- experimental = {
|
enableServerSideFuzzyMatch = true,
|
||||||
-- completion = {
|
},
|
||||||
-- enableServerSideFuzzyMatch = true,
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
typescript = {
|
||||||
-- },
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
-- typescript = {
|
tsserver = { maxTsServerMemory = 16384 },
|
||||||
-- updateImportsOnFileMove = { enabled = "always" },
|
suggest = {
|
||||||
-- suggest = {
|
completeFunctionCalls = true,
|
||||||
-- completeFunctionCalls = true,
|
},
|
||||||
-- },
|
inlayHints = {
|
||||||
-- inlayHints = {
|
enumMemberValues = { enabled = true },
|
||||||
-- enumMemberValues = { enabled = true },
|
functionLikeReturnTypes = { enabled = true },
|
||||||
-- functionLikeReturnTypes = { enabled = true },
|
parameterNames = { enabled = "literals" },
|
||||||
-- parameterNames = { enabled = "literals" },
|
parameterTypes = { enabled = true },
|
||||||
-- parameterTypes = { enabled = true },
|
propertyDeclarationTypes = { enabled = true },
|
||||||
-- propertyDeclarationTypes = { enabled = true },
|
variableTypes = { enabled = false },
|
||||||
-- variableTypes = { enabled = false },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
|
||||||
yamlls = {
|
yamlls = {
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
@@ -149,6 +148,9 @@ local servers = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local typescript_server = require("nixCatsUtils").getCatOrDefault("typescriptServer", "ts_ls")
|
||||||
|
servers[typescript_server == "vtsls" and "ts_ls" or "vtsls"] = nil
|
||||||
|
|
||||||
for server, config in pairs(servers) do
|
for server, config in pairs(servers) do
|
||||||
config.capabilities = capabilities
|
config.capabilities = capabilities
|
||||||
vim.lsp.config(server, config)
|
vim.lsp.config(server, config)
|
||||||
|
|||||||
@@ -107,9 +107,8 @@
|
|||||||
stylua
|
stylua
|
||||||
tree-sitter
|
tree-sitter
|
||||||
tailwindcss-language-server
|
tailwindcss-language-server
|
||||||
typescript-language-server
|
(if (categories.typescriptServer or "ts_ls") == "vtsls" then vtsls else typescript-language-server)
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
vtsls
|
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
yamllint
|
yamllint
|
||||||
];
|
];
|
||||||
@@ -214,6 +213,7 @@
|
|||||||
general = true;
|
general = true;
|
||||||
github = false;
|
github = false;
|
||||||
colorscheme = "zenwritten";
|
colorscheme = "zenwritten";
|
||||||
|
typescriptServer = "ts_ls";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,9 +13,18 @@ in
|
|||||||
{
|
{
|
||||||
imports = [ inputs.nvim.homeModules.default ];
|
imports = [ inputs.nvim.homeModules.default ];
|
||||||
|
|
||||||
options.nvim.colorscheme = lib.mkOption {
|
options.nvim = {
|
||||||
type = lib.types.enum (lib.attrNames themes);
|
colorscheme = lib.mkOption {
|
||||||
default = "zenwritten";
|
type = lib.types.enum (lib.attrNames themes);
|
||||||
|
default = "zenwritten";
|
||||||
|
};
|
||||||
|
typescriptServer = lib.mkOption {
|
||||||
|
default = "ts_ls";
|
||||||
|
type = lib.types.enum [
|
||||||
|
"ts_ls"
|
||||||
|
"vtsls"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.nvim.enable {
|
config = lib.mkIf config.nvim.enable {
|
||||||
@@ -23,6 +32,7 @@ in
|
|||||||
categories = {
|
categories = {
|
||||||
colorscheme = config.nvim.colorscheme;
|
colorscheme = config.nvim.colorscheme;
|
||||||
github = config.git.github.enable;
|
github = config.git.github.enable;
|
||||||
|
inherit (config.nvim) typescriptServer;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user