summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/lua/plugins/lsp.lua65
1 files changed, 31 insertions, 34 deletions
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index e9e8be8..bcec622 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -70,7 +70,7 @@ return {
70 70
71 -- misc. 71 -- misc.
72 local lspconfig = require('lspconfig') 72 local lspconfig = require('lspconfig')
73 local servers = { 'tsserver', 'jsonls', 'eslint', 'cssls', 'html', 'vala_ls' } 73 local servers = { 'tsserver', 'jsonls', 'eslint', 'cssls', 'html' }
74 for _, lsp in pairs(servers) do 74 for _, lsp in pairs(servers) do
75 lspconfig[lsp].setup { 75 lspconfig[lsp].setup {
76 on_attach = on_attach, 76 on_attach = on_attach,
@@ -126,27 +126,8 @@ return {
126 -- efm 126 -- efm
127 require("lspconfig")["efm"].setup({ 127 require("lspconfig")["efm"].setup({
128 on_attach = on_attach, 128 on_attach = on_attach,
129 filetypes = { 'sh' },
130 capabilities = capabilities
131 })
132
133 -- ltex
134 require("lspconfig")["ltex"].setup({
135 capabilities = capabilities, 129 capabilities = capabilities,
136 on_attach = function(client, bufnr) 130 filetypes = { 'sh' },
137 on_attach(client, bufnr)
138 require("ltex_extra").setup {
139 load_langs = { "en-GB" },
140 init_check = true,
141 log_level = "none",
142 }
143 end,
144 filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "mail", "text" },
145 settings = {
146 ltex = {
147 enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "mail", "plaintext" }
148 }
149 }
150 }) 131 })
151 132
152 vim.g.rustaceanvim = { 133 vim.g.rustaceanvim = {
@@ -167,13 +148,38 @@ return {
167 dap = { 148 dap = {
168 }, 149 },
169 } 150 }
151
152 lspconfig.harper_ls.setup {
153 on_attach = on_attach,
154 capabilities = capabilities,
155 settings = {
156 ["harper-ls"] = {
157 linters = {
158 spell_check = true,
159 spelled_numbers = false,
160 an_a = true,
161 sentence_capitalization = true,
162 unclosed_quotes = true,
163 wrong_quotes = false,
164 long_sentences = true,
165 repeated_words = true,
166 spaces = true,
167 matcher = true,
168 correct_number_suffix = true,
169 number_suffix_capitalization = true,
170 multiple_sequential_pronouns = true,
171 linking_verbs = false,
172 avoid_curses = true,
173 }
174 }
175 },
176 filetypes = {
177 "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "go", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki"
178 }
179 }
170 end, 180 end,
171 }, 181 },
172 { 182 {
173 "barreiroleo/ltex-extra.nvim",
174 event = "LspAttach",
175 },
176 {
177 "j-hui/fidget.nvim", 183 "j-hui/fidget.nvim",
178 event = "VeryLazy", 184 event = "VeryLazy",
179 opts = { 185 opts = {
@@ -199,13 +205,4 @@ return {
199 "folke/lazydev.nvim", 205 "folke/lazydev.nvim",
200 ft = "lua", -- only load on lua files 206 ft = "lua", -- only load on lua files
201 }, 207 },
202 {
203 'marcelofern/vale.nvim',
204 config = function()
205 require("vale").setup({
206 bin = "/usr/bin/vale",
207 vale_config_path = "$HOME/.config/vale/vale.ini",
208 })
209 end,
210 }
211} 208}