feat: move to in-process LSP#7
Open
cvigilv wants to merge 18 commits into
Open
Conversation
- Introduce `denote.lsp` module with handlers for definition, references, code actions, and commands. - Replace old autocmd-based link/backlink cache with LSP-driven navigation. - Refactor `denote.links` to use loclist and lgrep for link extraction. - Update API for backlinks to accept filename argument. - Remove cache population and update logic from autocmds. - Start LSP server automatically in denote filetype plugin. BREAKING CHANGE: Removes global link cache and changes how links/backlinks are discovered and displayed. Users must now rely on the built-in LSP for navigation and actions.
- Add `links` and `backlinks` functions to populate the loclist with links and backlinks for the current buffer, including formatted titles. - Refactor related code for consistency and improved formatting.
- Add LSP completion handler for Denote files, providing fuzzy-matched file suggestions with markdown documentation. - Improve hover handler to strip link syntax and format content as markdown. - Refactor definition and references handlers to use new API functions for links and backlinks. - Register new LSP capabilities for completion.
Set the global variable to true to correctly indicate that the plugin has been loaded, preventing redundant setup.
This change makes Org-mode follow links by: - Editing note files with text-like extensions directly in Neovim - Opening other file types via the OS default application - Adding platform-specific open commands for Windows, macOS, and Unix
6b431b8 to
1b2afee
Compare
This seems to generate some problems, but its worth keeping to debug the plugin. May remove this group after all, as I yet have found a solution that works seamlessly.
This is the first usercommands on the major change on moving into a more minimal and simple interface. The new command does one thing and it does it well: create a new note. Now users can select text visually and invoke this command to (i) create a new note with the selected text as title and (ii) automatically replace the selected text into a link into the newly created file. A major changes related to this commit also comes in the form of extending the API.The "denote.api.denote()" function now accepts a table with Denote components / fields, and a boolean to whether open the new file after creating the note.
3d501a7 to
31e1eff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decided to move this plugin into a new structure to make my life easier maintaining it.
The new structure organized denote.nvim as 2 parts:
ftpluginfor the actual denote fileslspto manage all intelligence and features related to working with denote.Although the API and command lines will still exists, the move to having a in-process LSP
allows me to use the LSP harness to expose features commonly used in other LSPs, such as code
actions, diagnostics, and more. This will allow me to add features more easily and make the
plugin more powerful.
This PR implements the preliminary version that will be available once all basic functionality is
implemented.