diff options
Diffstat (limited to '.config/nvim/lua')
| -rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 27 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins.lua | 2 |
2 files changed, 25 insertions, 4 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index d103607..2149db0 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua | |||
| @@ -331,10 +331,10 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) | |||
| 331 | vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts) | 331 | vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, opts) |
| 332 | 332 | ||
| 333 | local on_attach = function(client, bufnr) | 333 | local on_attach = function(client, bufnr) |
| 334 | -- Enable completion triggered by <c-x><c-o> | 334 | -- enable completion triggered by <c-x><c-o> |
| 335 | vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') | 335 | vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') |
| 336 | 336 | ||
| 337 | -- See `:help vim.lsp.*` for documentation on any of the below functions | 337 | -- see `:help vim.lsp.*` for documentation on any of the below functions |
| 338 | local bufopts = { noremap=true, silent=true, buffer=bufnr } | 338 | local bufopts = { noremap=true, silent=true, buffer=bufnr } |
| 339 | vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) | 339 | vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) |
| 340 | vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) | 340 | vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) |
| @@ -356,7 +356,7 @@ end | |||
| 356 | -- bring in cmp_nvim_lsp | 356 | -- bring in cmp_nvim_lsp |
| 357 | local capabilities = require('cmp_nvim_lsp').default_capabilities() | 357 | local capabilities = require('cmp_nvim_lsp').default_capabilities() |
| 358 | 358 | ||
| 359 | local servers = { 'jedi_language_server', 'texlab', 'clangd', 'ltex' } | 359 | local servers = { 'jedi_language_server', 'texlab', 'clangd' } |
| 360 | for _, lsp in ipairs(servers) do | 360 | for _, lsp in ipairs(servers) do |
| 361 | nvim_lsp[lsp].setup { | 361 | nvim_lsp[lsp].setup { |
| 362 | on_attach = on_attach, | 362 | on_attach = on_attach, |
| @@ -364,12 +364,31 @@ for _, lsp in ipairs(servers) do | |||
| 364 | } | 364 | } |
| 365 | end | 365 | end |
| 366 | 366 | ||
| 367 | nvim_lsp['efm'].setup{ | 367 | nvim_lsp['efm'].setup { |
| 368 | on_attach = on_attach, | 368 | on_attach = on_attach, |
| 369 | filetypes = { 'sh' }, | 369 | filetypes = { 'sh' }, |
| 370 | capabilities = capabilities | 370 | capabilities = capabilities |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | nvim_lsp.ltex.setup { | ||
| 374 | capabilities = capabilities, | ||
| 375 | on_attach = function(client, bufnr) | ||
| 376 | on_attach(client, bufnr) | ||
| 377 | require("ltex_extra").setup { | ||
| 378 | load_langs = { "en-GB" }, | ||
| 379 | init_check = true, | ||
| 380 | path = "/home/yigit/.local/share/nvim/ltex", | ||
| 381 | log_level = "none", | ||
| 382 | } | ||
| 383 | end, | ||
| 384 | settings = { | ||
| 385 | ltex = { | ||
| 386 | -- my settings here | ||
| 387 | } | ||
| 388 | } | ||
| 389 | } | ||
| 390 | |||
| 391 | |||
| 373 | -- rust-tools {{{ -- | 392 | -- rust-tools {{{ -- |
| 374 | 393 | ||
| 375 | -- Configure LSP through rust-tools.nvim plugin. | 394 | -- Configure LSP through rust-tools.nvim plugin. |
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 38c1acc..9855045 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua | |||
| @@ -16,6 +16,8 @@ return require('packer').startup(function(use) | |||
| 16 | 16 | ||
| 17 | -- latex suite | 17 | -- latex suite |
| 18 | use {'lervag/vimtex', ft = {'tex', 'latex', 'plaintext'}} | 18 | use {'lervag/vimtex', ft = {'tex', 'latex', 'plaintext'}} |
| 19 | -- provides external ltex file handling and other functions | ||
| 20 | use 'barreiroleo/ltex-extra.nvim' | ||
| 19 | 21 | ||
| 20 | -- treesitter | 22 | -- treesitter |
| 21 | use { | 23 | use { |
