Replies: 1 comment 3 replies
-
Thanks for raising this @edrex! As I see, the LSP protocol doesn't allow doing side-effects during goto-def resolution. However, I think this is something that can be done with a code action. E.g. in the following situation:
When the cursor is over the If you have some other use-cases or specific ideas as to what kind of error -> quickfix, please do share! |
Beta Was this translation helpful? Give feedback.
-
Currently links to unresolvable docs/sections can't be used, wiki-style, to create the missing resource. For me at least, this ability is an important aspect of editor support for markdown document stores.
How could this need be served in the context of a language server?
From a UX perspective, simply following the link (go to definition) would ideally cause the missing file/section to be created. If the server points to a non-existent file, can we rely on the editor to handle that? If so, maybe there could be a "wiki mode" where references always resolve, and following links opens a buffer on the new file. For headings, it could just point to the bottom or top of the file and rely on the user to add the correct heading.
For non-wiki mode maybe a code action could be used to create the missing file/heading.
(ps I started writing this as an aside in a comment on #117, but didn't want to hijack that PR.)
Beta Was this translation helpful? Give feedback.
All reactions