Closed
Description
System:
Linux openSUSE Tumbleweed 20250109 x86_64
Kernel: Linux 6.12.8-2-default
Neovim:
$ nvim -v
NVIM v0.10.3
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260
Langserver (tested github release, stable from nimble and latest commit):
$ nimlangserver --version
1.6.0
Nimsuggest (comes with Nim 2.0.14 by default):
$ nimsuggest --version
Nim Compiler Version 2.0.14 [Linux: amd64]
Compiled at 2024-12-23
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: bf4de6a394e040d9810cba8c69fb2829ff04dcc6
active boot switches: -d:release -d:danger --gc:markAndSweep
Neovim config:
local Plug = vim.fn['plug#']
vim.call('plug#begin', '~/.config/nvim/plugged')
Plug 'neovim/nvim-lspconfig'
vim.call('plug#end')
-- LSP completion
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
end
})
require('lspconfig').nim_langserver.setup{
settings = {
nim = {
autoCheckProject = true,
autoCheckFile = false,
nimsuggestTimeout = 300000,
}
}
}
:LspInfo
:
lspconfig: require("lspconfig.health").check()
LSP configs active in this session (globally) ~
- Configured servers: nim_langserver
- OK Deprecated servers: (none)
LSP configs active in this buffer (bufnr: 1) ~
- Language client log: ~/.local/state/nvim/lsp.log
- Detected filetype: `nim`
- 1 client(s) attached to this buffer
- Client: `nim_langserver` (id: 1, bufnr: [1])
root directory: ~/Fluffy/code/playground/lsp_bug/
filetypes: nim
cmd: ~/.nimble/bin/nimlangserver
version: `1.6.0`
executable: true
autostart: true
...
:checkhealth lsp
:
vim.lsp: require("vim.lsp.health").check()
- LSP log level : WARN
- Log path: /home/janakali/.local/state/nvim/lsp.log
- Log size: 147 KB
vim.lsp: Active Clients
- nim_langserver (id: 1)
Root directory: ~/Fluffy/code/playground/lsp_bug
Command: /home/janakali/.nimble/bin/nimlangserver
Settings: {
nim = {
autoCheckFile = false,
autoCheckProject = true,
nimsuggestTimeout = 300000
}
}
Attached buffers: 1
vim.lsp: File Watcher
- file watching "(workspace/didChangeWatchedFiles)" disabled on all clients
vim.lsp: Position Encodings
- No buffers contain mixed position encodings
Reproduction steps:
$ mkdir lsp_bug
$ cd lsp_bug
$ nimble init -y
<edit `src/lsp_bug.nim` to introduce syntax error>
$ nvim src/ls_bug.nim
<no diagnostics, no errors, lsp completion works>
<edit something again>
:w
<still no diagnostics or errors>
Single source files outside of projects work as expected.
I can definitely remember this working more than a month ago, but can't get diagnostics to work with old langserver + old neovim. Very weird.
Metadata
Metadata
Assignees
Labels
No labels