From 31dc4351f9601d839ba13117fcf6e1ed26559f03 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 4 Sep 2024 15:11:12 +0200 Subject: nvim: remove vale and ltex, use harper-ls --- .config/nvim/lua/plugins/lsp.lua | 65 +++++++++++++++++++--------------------- 1 file 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 { -- misc. local lspconfig = require('lspconfig') - local servers = { 'tsserver', 'jsonls', 'eslint', 'cssls', 'html', 'vala_ls' } + local servers = { 'tsserver', 'jsonls', 'eslint', 'cssls', 'html' } for _, lsp in pairs(servers) do lspconfig[lsp].setup { on_attach = on_attach, @@ -126,27 +126,8 @@ return { -- efm require("lspconfig")["efm"].setup({ on_attach = on_attach, - filetypes = { 'sh' }, - capabilities = capabilities - }) - - -- ltex - require("lspconfig")["ltex"].setup({ capabilities = capabilities, - on_attach = function(client, bufnr) - on_attach(client, bufnr) - require("ltex_extra").setup { - load_langs = { "en-GB" }, - init_check = true, - log_level = "none", - } - end, - filetypes = { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "mail", "text" }, - settings = { - ltex = { - enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "mail", "plaintext" } - } - } + filetypes = { 'sh' }, }) vim.g.rustaceanvim = { @@ -167,12 +148,37 @@ return { dap = { }, } + + lspconfig.harper_ls.setup { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ["harper-ls"] = { + linters = { + spell_check = true, + spelled_numbers = false, + an_a = true, + sentence_capitalization = true, + unclosed_quotes = true, + wrong_quotes = false, + long_sentences = true, + repeated_words = true, + spaces = true, + matcher = true, + correct_number_suffix = true, + number_suffix_capitalization = true, + multiple_sequential_pronouns = true, + linking_verbs = false, + avoid_curses = true, + } + } + }, + filetypes = { + "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "go", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html", "vimwiki" + } + } end, }, - { - "barreiroleo/ltex-extra.nvim", - event = "LspAttach", - }, { "j-hui/fidget.nvim", event = "VeryLazy", @@ -199,13 +205,4 @@ return { "folke/lazydev.nvim", ft = "lua", -- only load on lua files }, - { - 'marcelofern/vale.nvim', - config = function() - require("vale").setup({ - bin = "/usr/bin/vale", - vale_config_path = "$HOME/.config/vale/vale.ini", - }) - end, - } } -- cgit v1.2.3-70-g09d2