Is harper supposed to work for git commit messages that are edited by neovim? #352
-
Hi. I've set up harper using mason to be used by neovim. I've confirmed that harper is loaded by running There are no relevant errors in Yet i don't get any suggestions for obvious types or cursing. I get them when i edit .cpp files for example. My neovim config contains: if has('nvim')
" LSP manager
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'neovim/nvim-lspconfig'
endif
if has('nvim-0.9') && PlugLoaded('mason.nvim')
lua require("mason").setup()
lua <<EOF
require'mason-lspconfig'.setup{
ensure_installed = {"harper_ls"}
}
EOF
lua <<EOF
require'lspconfig'.harper_ls.setup {
filetypes = {"gitcommit", "markdown", "cpp"},
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,
terminating_conjunctions = true
}
}
}
}
EOF
endif
Is my use case supposed to work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
What a coincidence! I was just looking into this problem. Yes, |
Beta Was this translation helpful? Give feedback.
Alright! I've nailed it down. Apparently the standard language ID for git commit buffers is
git-commit
, as demonstrated here. Neovim, however, emitsgitcommit
. I've updatedharper-ls
to accept both options. It should be working in the next release.