neovim configuration using rocks.nvim plugin manager
1---@module "lspconfig"
2
3-- HACK: is `@type lspconfig.options` a thing?
4
5---@diagnostic disable: missing-fields
6---@type table<string, vim.lsp.ClientConfig>
7return {
8 astro = {},
9 clangd = {},
10 cssls = {},
11 dartls = {},
12 emmet_language_server = {},
13 gopls = {},
14 hls = {
15 settings = {
16 haskell = {
17 formattingProvider = "ormolu",
18 checkProject = true,
19 },
20 },
21 },
22 html = {},
23 jsonls = {},
24 lua_ls = {
25 -- on_init = require("utils").lazydev_is_not_working,
26 settings = {
27 Lua = {
28 hint = {
29 enable = true,
30 arrayIndex = "Disable",
31 paramType = false,
32 setType = true,
33 },
34 completion = {
35 callSnippet = "Replace",
36 },
37 diagnostics = {
38 unusedLocalExclude = { "_*" },
39 globals = { "vim" },
40 },
41 format = {
42 enable = false, -- use stylua istead
43 },
44 workspace = {
45 checkThirdParty = "Disable",
46 },
47 },
48 },
49 },
50 nil_ls = {
51 on_attach = function (client, bufnr)
52 -- if bufIsBig(bufnr) then
53 client.server_capabilities.semanticTokensProvider = nil
54 -- end
55 end
56 },
57 ts_ls = {
58 settings = {
59 typescript = {
60 inlayHints = {
61 includeInlayParameterNameHints = "all",
62 includeInlayParameterNameHintsWhenArgumentMatchesName = false,
63 includeInlayVariableTypeHintsWhenTypeMatchesName = false,
64 includeInlayFunctionParameterTypeHints = true,
65 includeInlayVariableTypeHints = false,
66 includeInlayPropertyDeclarationTypeHints = true,
67 includeInlayFunctionLikeReturnTypeHints = true,
68 includeInlayEnumMemberValueHints = true,
69 },
70 },
71 javascript = {
72 inlayHints = {
73 includeInlayParameterNameHints = "all",
74 includeInlayParameterNameHintsWhenArgumentMatchesName = false,
75 includeInlayVariableTypeHintsWhenTypeMatchesName = false,
76 includeInlayFunctionParameterTypeHints = true,
77 includeInlayVariableTypeHints = false,
78 includeInlayPropertyDeclarationTypeHints = true,
79 includeInlayFunctionLikeReturnTypeHints = true,
80 includeInlayEnumMemberValueHints = true,
81 },
82 },
83 },
84 },
85 sourcekit = {},
86 svelte = {},
87 ruff = {},
88 rust_analyzer = {
89 cargo = {
90 buildScripts = {
91 -- enable = true,
92 },
93 },
94 },
95 -- volar = {
96 -- filetypes = {
97 -- "javascript",
98 -- "typescript",
99 -- "javascriptreact",
100 -- "typescriptreact",
101 -- "vue",
102 -- "json",
103 -- },
104 -- -- on_new_config = function(new_config, new_root_dir)
105 -- -- new_config.init_options.typescript.tsdk = "/path/to/tsserver"
106 -- -- end
107 -- },
108 -- yamlls = {
109 -- settings = {
110 -- yaml = {
111 -- on_new_config = function(new_config)
112 -- if require("utils").plugin.has("SchemaStore.nvim") then
113 -- new_config.settings.yaml.schemas = new_config.settings.yaml.schemas or {}
114 -- vim.list_extend(new_config.settings.yaml.schemas, require("schemastore").yaml.schemas())
115 -- end
116 -- end,
117 -- schemaStore = {
118 -- enable = false,
119 -- },
120 -- },
121 -- },
122 -- },
123}