ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.91k stars 458 forks source link

How can I make vim's syntax error prompt not at the end of the text box, but also display it normally? #1104

Closed shitly closed 9 months ago

shitly commented 9 months ago

Feature description

How can I make vim's syntax error prompt not at the end of the text box, but also display it normally? For example, I can use Space + ga to display error details and repair methods, just like vscode. Currently, only the status of ctr cut out will be displayed. An error pops up, and sometimes the error is not prompted at the end of the line, so how to optimize this usage preference. Is there any relevant plug-in that can do it, and whether there is a method currently, but I don’t know the shortcut keys.

lIt means that the error can be displayed in the wrong chart position and related operations can be performed.

Additional information

No response

ayamir commented 9 months ago

You can press gt under normal mode or execute :TroubleToggle to toggle diagnostic messages. Besides, add this line to lua/user/settings.lua to disable diagnostics_virtual_text at the end of line.

settings["diagnostics_virtual_text"] = false

Final effect: image

xx-zhang commented 9 months ago

@ayamir thanks, i have tried like you desc, and get some what i want.

xx-zhang commented 9 months ago

@ayamir have you used coc.nvim, its configfile can be more queit then meson, i tried its coc-python,. coc-clangd, and then feel more smooth.

ayamir commented 9 months ago

@ayamir have you used coc.nvim, its configfile can be more queit then meson, i tried its coc-python,. coc-clangd, and then feel more smooth.

Yes, we had coc branch before but now we only support neovim native lsp.

redauzhang commented 9 months ago

@ayamir 我一直找到了这个分支 https://github.com/ayamir/nvimdots/tree/3c65e6e9a320503e6c5f8a9b2a6e82e16484cb03 发现仍然是 lsp, 我喜欢咱们这个搜索和一些快捷键,find提示,弹框等,coc.nvim 的配置文件我感觉要比 lsp简单。 我准备尝试使用 lsp代理 coc试试,你能提供一个 commit 的记录,我自己导出来跟着修改下吗。如果在现在这个基础上修改我看工作量比较大。因为目录结构使用都比较固定

ayamir commented 9 months ago

The coc branch is deleted in our repo, but you can find it in other forks like: https://github.com/hypghzy/nvimdots/tree/coc

redauzhang commented 9 months ago

ok, thanks