Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ii14/lsp-command
Command interface for neovim LSP
https://github.com/ii14/lsp-command
lsp neovim nvim
Last synced: 2 months ago
JSON representation
Command interface for neovim LSP
- Host: GitHub
- URL: https://github.com/ii14/lsp-command
- Owner: ii14
- Created: 2021-11-20T07:42:00.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-23T20:51:32.000Z (over 2 years ago)
- Last Synced: 2024-08-07T18:37:50.422Z (6 months ago)
- Topics: lsp, neovim, nvim
- Language: Lua
- Homepage:
- Size: 26.4 KB
- Stars: 49
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lsp-command
Command interface for neovim LSP.
Provides full access to LSP features with a single `:Lsp` command. To give few examples,
instead of `:lua vim.lsp.buf.workspace_symbol('foo')`, you can simply write `:Lsp find foo`.
To format a range of lines, make a visual selection and write `:Lsp format` (or
abbreviate it to just `:Lsp f`). `lspconfig` commands are now subcommands for `:Lsp`:
`:LspInfo` is now `:Lsp info`/`:Lsp?`, `:LspStart` is `:Lsp start` etc.Completion for `:Lsp` command is contextual. Only completions valid in the current
context are suggested. That is, if the current buffer is not attached to any server, the
only completions will be `info`, `start`, `stop`, `restart`. If buffer is attached, only
actions supported by the attached language server are suggested.Custom commands in vim have to start with an uppercase letter, but this plugin goes around
it by defining a basic command line abbreviation, or an alias, from the lowercase `:lsp`.
This means all of the examples above can be also written without capitalizing the first
letter: `:lsp find foo`, `:lsp format`, `:lsp info` etc.The interface is not final. Command names, their arguments and how they can be abbreviated
can change at any time.Requires `neovim/lspconfig`.
## Usage
[`:h :Lsp`](doc/lspcommand.txt)