Open marcinjahn opened 4 months ago
Same issue in Neovim 10.1
Ok. I will try to fix it this time..
Emm. seems you jump from telescope.. now I have not made the plugin for telecope yet..
I have add support for telescope now, but a very basic one, I think I have solved it
Same issue in Neovim 10.1 & csharpls-extended-lsp.nvim (commit c367733)
Same issue in Neovim 10.1 & csharpls-extended-lsp.nvim (commit c367733)
I mean with the telescope extension command . I have add an telescope extension for this project, try use that to go to definition
I tried telescope but I get the same error.
The function I tried is require("telescope.builtin").lsp_definitions()
Also, when I do vim.lsp.buf.definition()
, it jumps to the definition after the error occurs, but the file to jump to is displayed in the Buffer of the original file.
I tried telescope but I get the same error. The function I tried is
require("telescope.builtin").lsp_definitions()
Also, when I dovim.lsp.buf.definition()
, it jumps to the definition after the error occurs, but the file to jump to is displayed in the Buffer of the original file.
No, the command is
Telescope csharpls_definition
I am sorry.
I tried Telescope csharpls_definition
, But the results were the same as before
, it jumps to the definition after the error occurs, but the file to jump to is displayed in the Buffer of the original file.
I am sorry. I tried
Telescope csharpls_definition
, But the results were the same as before, it jumps to the definition after the error occurs, but the file to jump to is displayed in the Buffer of the original file.
Emm, if you use the plugin of mime, the error won't throw from the _lsp.lua of telescope I think. Can you show me the picture?
I tried telescope but I get the same error. The function I tried is
require("telescope.builtin").lsp_definitions()
Also, when I dovim.lsp.buf.definition()
, it jumps to the definition after the error occurs, but the file to jump to is displayed in the Buffer of the original file.
I see, what kind of error? and can you provide me some snippets?
Emm, if you use the plugin of mime, the error won't throw from the _lsp.lua of telescope I think. Can you show me the picture?
Emm, if you use the plugin of mime, the error won't throw from the _lsp.lua of telescope I think. Can you show me the picture?
I want this snippet.
I can't show you the problematic code because it is for work. So I tried to create a minimal reproduction code, but it did not work. (It works fine with the minimal code.)
For reference, here is a screenshot of the debugger when the problem occurred
The lnum and col of the fetched variable are different from the actual code definition. By the way, what is the encoding of offset_encoding? The encoding of the source code is utf-8 (without BOM)
I can't show you the problematic code because it is for work. So I tried to create a minimal reproduction code, but it did not work. (It works fine with the minimal code.)
For reference, here is a screenshot of the debugger when the problem occurred
The lnum and col of the fetched variable are different from the actual code definition. By the way, what is the encoding of offset_encoding? The encoding of the source code is utf-8 (without BOM)
the encoding is from neovim.. I think it error because that file is a windows file? which contains \t\n
? Emm.. can you try ignore the encoding from neovim, always utf8, will it work for you? I think maybe csharp_ls always provide the buff with utf-8.. I should not use the encoding from current buffer. but this code is copy from omnisharp_extended.nvim.. I do not quite understand the logic
update: utf16 works fine when jump to System.Console.. Emm
file is a windows file? which contains \t\n?
Yes, this file is windows file. EOL code is \r\n
.
However, the smallest code tested is also a windows file, but it jumped correctly.
Here is a screenshot of the Debugger at that time
always utf8, will it work for you?
The result is the same as before.
but this code is copy from omnisharp_extended.nvim
I tried omnisharp & omnisharp_extended.nvim and got an error. However, the error content and the location of the error are different The following is for your reference
file is a windows file? which contains \t\n?
Yes, this file is windows file. EOL code is
\r\n
. However, the smallest code tested is also a windows file, but it jumped correctly. Here is a screenshot of the Debugger at that timealways utf8, will it work for you?
The result is the same as before.
but this code is copy from omnisharp_extended.nvim
I tried omnisharp & omnisharp_extended.nvim and got an error. However, the error content and the location of the error are different The following is for your reference
Can you jump to the location_to_items, and get the data when it panic? I have read the code in neovim. seems the lnum and col is recaculated by neovim. and the problem is this line
local col = M._str_byteindex_enc(line, pos.character, offset_encoding)
I need know then there is error, the value of line and pos.caculator.
Emm,, https://github.com/neovim/neovim/issues/19237#issuecomment-1176118657 Seems it is the issue of neovim
@Decodetalkers Thank you for your cooperation.
Can you jump to the location_to_items, and get the data when it panic? I have read the code in neovim. seems the lnum and col is recaculated by neovim. and the problem is this line
The following screenshot shows the debugger when jumping to the same method
when an error occurs:
Normal (no use decompiler, definition jumps in the library source):
https://github.com/neovim/neovim/issues/19237#issuecomment-1176118657 Seems it is the issue of neovim
If so, does that mean there is a problem with the decompiled code?
@Decodetalkers Thank you for your cooperation.
Can you jump to the location_to_items, and get the data when it panic? I have read the code in neovim. seems the lnum and col is recaculated by neovim. and the problem is this line
The following screenshot shows the debugger when jumping to the same method
when an error occurs:
Normal (no use decompiler, definition jumps in the library source):
neovim/neovim#19237 (comment) Seems it is the issue of neovim
If so, does that mean there is a problem with the decompiled code?
seems that get_lines get "", and it should panic during getting line[row]... Why there is no data in line?
maybe problem is this line:
here I should get the data and write it into the buf, I think maybe the buf is not created? or the data is empty? can step to this function and see it for me? thanks
I'm using LazyVim. I installed the plugin like this:
The plugin works in general, however, when I try to go to definition of any built-in .NET type (like
IReadOnlyCollection
) or just any type from nugets, I get an error:Any idea what might be the reason? Is there any minimal example of neovim config with this plugin enabled? The README instructions are a bit unclear, and they refer (by mistake?) to omnisharp.