marksman
marksman copied to clipboard
Feature request: rename files when using the rename action
Currently, the rename action modifies the title of a heading and links referencing it, but the name of the file containing it is left as is.
Would it be possible to have an option (or another distinct code action) to also rename the file as well?
I'd imagine it working slightly differently -- you rename a file using your editor's regular 'rename' functionality and Marksman in response adjusts all the references to the renamed file. LSP has hooks for this such as textDocument/willRename and textDocument/didRename and at least in Emacs with lsp-mode these hooks work; I think neovim also handles this properly.
Most of the required functionality is already present in Marksman as part of title rename refactor. Implementing the hooks for file renaming should be straightforward.
Support for file rename with hooks in Helix: https://github.com/helix-editor/helix/pull/5531
I just found nvim-lsp-file-operations for neovim. Unfortunately, with my lazyvim config it is not working.
I just found nvim-lsp-file-operations for neovim. Unfortunately, with my lazyvim config it is not working.
FYI, some file explorers such as oil.nvim correctly emit file operations with LSP methods (e.g., "workspace/willRenameFiles").
It would be great to have marksman support LSP file operations.