summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/lsp.lua')
-rw-r--r--.config/nvim/lua/plugins/lsp.lua94
1 files changed, 72 insertions, 22 deletions
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index 2fa92c2..e710fd7 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -155,26 +155,7 @@ return {
155 filetypes = { 'sh', 'tex' }, 155 filetypes = { 'sh', 'tex' },
156 }) 156 })
157 157
158 vim.g.rustaceanvim = { 158 require("lspconfig")["harper_ls"].setup {
159 -- Plugin configuration
160 tools = {
161 },
162 -- LSP configuration
163 server = {
164 on_attach = on_attach,
165 vim.lsp.inlay_hint.enable(true),
166 default_settings = {
167 -- rust-analyzer language server configuration
168 ['rust-analyzer'] = {
169 },
170 },
171 },
172 -- DAP configuration
173 dap = {
174 },
175 }
176
177 lspconfig.harper_ls.setup {
178 on_attach = on_attach, 159 on_attach = on_attach,
179 capabilities = capabilities, 160 capabilities = capabilities,
180 settings = { 161 settings = {
@@ -199,12 +180,58 @@ return {
199 } 180 }
200 }, 181 },
201 filetypes = { 182 filetypes = {
202 "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki" 183 "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki", "tex"
184 },
185 root_dir = function(fname)
186 return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
187 end,
188 }
189
190 -- ltex
191 require("lspconfig")["ltex"].setup({
192 capabilities = capabilities,
193 on_attach = function(client, bufnr)
194 on_attach(client, bufnr)
195 require("ltex_extra").setup {
196 load_langs = { "en-GB" },
197 init_check = true,
198 log_level = "none",
199 }
200 end,
201 filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "mail", "text" },
202 settings = {
203 ltex = {
204 enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "mail", "plaintext" }
205 }
203 } 206 }
207 })
208
209 vim.g.rustaceanvim = {
210 -- Plugin configuration
211 tools = {
212 },
213 -- LSP configuration
214 server = {
215 on_attach = on_attach,
216 vim.lsp.inlay_hint.enable(true),
217 default_settings = {
218 -- rust-analyzer language server configuration
219 ['rust-analyzer'] = {
220 },
221 },
222 },
223 -- DAP configuration
224 dap = {
225 },
204 } 226 }
205 end, 227 end,
206 }, 228 },
207 { 229 {
230 "barreiroleo/ltex_extra.nvim",
231 ft = { "markdown", "tex" },
232 dependencies = { "neovim/nvim-lspconfig" },
233 },
234 {
208 "j-hui/fidget.nvim", 235 "j-hui/fidget.nvim",
209 event = "VeryLazy", 236 event = "VeryLazy",
210 opts = { 237 opts = {
@@ -228,9 +255,32 @@ return {
228 }, 255 },
229 { 256 {
230 "folke/lazydev.nvim", 257 "folke/lazydev.nvim",
231 ft = "lua", -- only load on lua files 258 ft = "lua",
232 }, 259 },
233 { 260 {
234 'fatih/vim-go' 261 'fatih/vim-go'
262 },
263 {
264 "danymat/neogen",
265 config = true,
266 opts = {
267 snippet_engine = "luasnip",
268 languages = {
269 python = {
270 template = {
271 annotation_convention = "reST",
272 }
273 }
274 }
275 }
276 },
277 {
278 'marcelofern/vale.nvim',
279 config = function()
280 require("vale").setup({
281 bin = "/usr/bin/vale",
282 vale_config_path = "$HOME/.config/vale/.vale.ini",
283 })
284 end,
235 } 285 }
236} 286}