Skip to content
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

When opening files with line number, language lookup fails and shows an error #281

Open
revelationnow opened this issue Jul 21, 2023 · 0 comments

Comments

@revelationnow
Copy link

When opening a file:

nvim test.cpp:20

Error detected while processing BufEnter Autocommands for "*":
Error executing lua callback: .../start/navigator.lua/lua/navigator/lspclient/clients.lua:530: E474: Invalid argument
stack traceback:
[C]: in function 'nvim_buf_set_option'
.../start/navigator.lua/lua/navigator/lspclient/clients.lua:530: in function 'setup'
.../start/navigator.lua/lua/navigator/lspclient/clients.lua:643: in function 'on_filetype'
...m/site/pack/packer/start/navigator.lua/lua/navigator.lua:308: in function <...m/site/pack/packer/start/navigator.lua/lua/navigator.lua:307>

Fix would be to identify any colons in the extension and calculate the ext variable to be just the extension and not also the line number

local ext = vfn.expand('%:e')
if string.match(ext, ":") then
  ext = string.match(ext,"(.*);")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant