-
Notifications
You must be signed in to change notification settings - Fork 21
Spell sitter not showing incorrect spelling (/not working) #8
Comments
I've noticed that if I |
AFAIK require('spellsitter').setup{
hl = 'error',
} I haven't done any testing with any spell options you listed. You may want to try with them commented out. The whole plugin is only ~170 LOC, so it should be easy to insert a few print statements to see what's going on. Some things to know:
This plugin is pretty WIP, the concept of it is a bit flawed too since neovims built-in spellchecker has a pretty scattered implementation. Hopefully this plugin can help figure out what we need to do to improve it. |
Just tried commenting my settings out as well as changing the highlight, but that doesn't seem to make a difference. I'll clone the repo and poke around when next I get a chance to see if I can find what's going on |
@akinsho I have the same issue. Did you made it working for you? |
@weilbith I recently had to re-install my machine (for unrelated reasons) and now it seems to work, tbh I have no idea what changed, I think I must have removed some plugin or setting somewhere that must have made the difference. I also recently re-added |
Are you sure the plugin is working and your not running the regular spellchecker using vims regex syntax engine? I use this lua function to detect if the regex syntax engine is enabled for a buffer: function Syn_stack()
local c = vim.api.nvim_win_get_cursor(0)
local stack = vim.fn.synstack(c[1], c[2]+1)
for i, l in ipairs(stack) do
stack[i] = vim.fn.synIDattr(l, 'name')
end
print(vim.inspect(stack))
end
map('n', '<leader>z', ':lua Syn_stack()<CR>', {noremap=true}) |
@lewis6991 you're right, I just checked the |
@akinsho The filetype not being set properly/too late is a known problem nanotee/nvim-lua-guide#69 and neovim/neovim#14774 (comment) |
@matu3ba I don't really know how the issues you're describing relate here. I'm yet to figure out what actually causes this issue for me, so I can't really change the title. My filetypes aren't being set differently than anyone else's, since I depend on vim's default |
For me, it works well when i open a file directly from the command line
but when i change file inside nvim
it does not work unless using the |
Trying to track this down, it looks like the plugin is still going through the motions correctly in that I found by fiddling with the
|
A bit more playing: this seems to be connected to the nvim-lspconfig plugin. If i uninstall it, then spellsitter doesn't show the behaviour above. |
It seems that there are occasions like in lewis6991#8 where the spelling isn't working correctly. This is because the value of spelllang hasn't yet been parsed for the window. This results in the check for the loading of the language files causing an early return from the spell check function. The problematic line is [375 of neovim's spell.c](https://github.com/neovim/neovim/blob/1c416892879de6b78038f2cc2f1487eff46abb60/src/nvim/spell.c#L375) By running the `did_set_spellang` function before running the spell checks, this ensures that these laguage files have been appropriately loaded. Fixes lewis6991#8
Hey thanks for working on this plugin, I've really been missing having
spell
working in treesitter languages.Apologies for the
it doesn't work
type issue but for the life of me I really can't seem to get it to work. I'm not sure if this is because it's stillWIP
in which case I'll just wait a bit, or if it should be working.I have the plugin configured as
I'm on the latest
nvim nightly
, I havespell
set to0
my other spell related settings areFWIW it was working when it was based on
hunspell
although I'm very glad to be done with an external dependency.The text was updated successfully, but these errors were encountered: