marksman icon indicating copy to clipboard operation
marksman copied to clipboard

Code action to create file require restart to be recognized

Open levouh opened this issue 1 year ago • 8 comments

I am not sure what configuration/reproduction I need to provide, so let me know if what is here is not enough. THe marksman version used here is the latest release - 1.0.0-77f348c.

I have the following layout (just random files for testing how marksman works):

image

where my .marksman.toml does not contain anything (which appears to just assume the defaults).

If I open foo.md which is completely empty and add a reference to bar.md (which does not exist), I get the following:

image

which is completely as-expected. Requesting available code actions then:

image

and accepting the Create bar.md action, it creates bar.md as expected:

image

however the diagnostic message does not go away, and trying to goto definition of bar.md via the inserted [[bar]] text does not do anything.

image

If I restart the entire Neovim instance, it works just fine.

I am just starting marksman myself with vim.lsp.start with Neovim 0.10 (roughly nightly build). The LSP communication logs only show things like:

[ERROR][2023-08-18 23:22:03] .../vim/lsp/rpc.lua:675	"rpc"	"marksman"	"stderr"	'[23:22:03 WRN] <Doc> Unexpected document version: {"newVersion": 10, "currentVersion": 8, "uri": "file:///home/user/mnt/notes/development.md"}\n'
[ERROR][2023-08-18 23:22:03] .../vim/lsp/rpc.lua:675	"rpc"	"marksman"	"stderr"	'[23:22:03 WRN] <Doc> Unexpected document version: {"newVersion": 12, "currentVersion": 10, "uri": "file:///home/user/mnt/notes/development.md"}\n'
[ERROR][2023-08-18 23:22:03] .../vim/lsp/rpc.lua:675	"rpc"	"marksman"	"stderr"	'[23:22:03 WRN] <Doc> Unexpected document version: {"newVersion": 14, "currentVersion": 12, "uri": "file:///home/user/mnt/notes/development.md"}\n'

but nothing related to foo.md or bar.md.

I am currently running Neovim inside of an Archlinux container, and ~/mnt is a mounted directory to the host (which is WSL). However, I have tried with markdown files in a directory without all of these nuances and still see the same behavior.


Is there anything else I can do to debug/help?

levouh avatar Aug 18 '23 23:08 levouh