-
-
Notifications
You must be signed in to change notification settings - Fork 360
Linters get confused #402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this is an issue with how the motion targets get shown. It seems like it changes the actual text of the buffer, and many linters with live linting will try to send the contents of the buffer for linting. (I ran into this on https://github.com/neoclide/coc-tsserver and it seems to be a problem for Language Server Protocol plugins in general). Seems like neovim is considering some things that may help: |
I got just the same problem using (https://github.com/neoclide/coc-tsserver) did you guys get a way around this issue? |
same issue here.. wondering if there is a workaround to linter triggering |
Same issue as well. |
I would like to use |
I resolved to using vim-sneak for now, hoping one day this is addressed. |
@vieko does label-mode in vim-sneak not have this issue? I tried looking through that repo and it seems that they use highlighting somehow to display labels though I'm not familiar enough with vim-script to tell how they actually do it... |
label-mode works just fine for vim-sneak, good call! There's bound to be a hint / trail to follow here. |
Hey, same problem here with I thought easymotion hints were displayed using virtual text, and not actual changes to the buffer. Can virtual text be used to display easymotion hints? Or can it only be used where there is no actual text? I suspect no linter would be confused if hints were displayed using virtual text instead, but then maybe there would be conflicts to solve between the actual linter messages and easymotion hints? |
There's an issue and workaround here, I'm trying it out now |
I love easymotion and coc both. And this is the only issue that is making me stick to vscode. Hope easymotion provides a workaround to fix this issue |
Im facing the same issue. |
I use this work around, posted here maybe someone else need it. in
the idea is setting a flag before easymotion function. then at somewhere else, use the flag to determine linter behavior.
|
Adding an User autocmd should make this a lot easier. Please take a look at my PR. |
Any insight on this? |
I saw something here |
The autocmd change mentioned in #440 is an okay temporary fix with one major issue. When you listen to that event it triggers all folds to close making easymotion unusable on any buffer with folds unless you have a very high foldlevel. |
It seems that all of you meant coc and not other linters. I'm marking this issue to be solved on my PR. |
Switch to hop as shown here you can also integrate it in vscode without any extra configuration: hadronized/hop.nvim#349 Since this etension doesn't write to the buffer it also works native in vscode |
There seems to be repetitive I have this below workaround vim.api.nvim_create_autocmd("User", {pattern = {"EasyMotionPromptBegin"}, callback = function() vim.diagnostic.disable() end})
function check_easymotion()
local timer = vim.loop.new_timer()
timer:start(500, 0, vim.schedule_wrap(function()
-- vim.notify("check_easymotion")
if vim.fn["EasyMotion#is_active"]() == 0 then
vim.diagnostic.enable()
vim.g.waiting_for_easy_motion = false
else
check_easymotion()
end
end))
end
vim.api.nvim_create_autocmd("User", {
pattern = "EasyMotionPromptEnd",
callback = function()
if vim.g.waiting_for_easy_motion then return end
vim.g.waiting_for_easy_motion = true
check_easymotion()
end
}) but it required cursor to move at least once after EasyMotion to enable the diagnostics. I'll see if I can create PR to fix this behaviour |
Here is a small issue I have :
When easymotion is used the linter get mad.
Any tips on where to hook to know if linter should lint or if someone implemented that ?
The text was updated successfully, but these errors were encountered: