| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim.
listen to the LspProgressUpdate event to update your statusline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the specification[1] the payload must look like this:
interface DidSaveTextDocumentParams {
/**
* The document that was saved.
*/
textDocument: TextDocumentIdentifier;
/**
* Optional the content when saved. Depends on the includeText value
* when the save notification was requested.
*/
text?: string;
}
`text` must be on the same level as `textDocument´.
Where `TextDocumentIdentifier` is:
interface TextDocumentIdentifier {
/**
* The text document's URI.
*/
uri: DocumentUri;
}
[1]: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave
|
| |
|
|
|
|
| |
Server (#13175)
|
|
|
|
|
|
|
|
|
|
|
| |
* First implementation of workspace folders
* Add completion for current directory
* Add tracking of workspace folders
* Add workspace folder listing
* Add checks on adding/removing workspaces
* Add appropriate initialization options
* Add documentation
* Make workspaceFolders available wherever client is
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Breaking Changes:
- Deprecated all `vim.lsp.util.{*diagnostics*}()` functions.
- Instead, all functions must be found in vim.lsp.diagnostic
- For now, they issue a warning ONCE per neovim session. In a
"little while" we will remove them completely.
- `vim.lsp.callbacks` has moved to `vim.lsp.handlers`.
- For a "little while" we will just redirect `vim.lsp.callbacks` to
`vim.lsp.handlers`. However, we will remove this at some point, so
it is recommended that you change all of your references to
`callbacks` into `handlers`.
- This also means that for functions like |vim.lsp.start_client()|
and similar, keyword style arguments have moved from "callbacks"
to "handlers". Once again, these are currently being forward, but
will cease to be forwarded in a "little while".
- Changed the highlight groups for LspDiagnostic highlight as they were
inconsistently named.
- For more information, see |lsp-highlight-diagnostics|
- Changed the sign group names as well, to be consistent with
|lsp-highlight-diagnostics|
General Enhancements:
- Rewrote much of the getting started help document for lsp. It also
provides a much nicer configuration strategy, so as to not recommend
globally overwriting builtin neovim mappings.
LSP Enhancements:
- Introduced the concept of |lsp-handlers| which will allow much better
customization for users without having to copy & paste entire files /
functions / etc.
Diagnostic Enhancements:
- "goto next diagnostic" |vim.lsp.diagnostic.goto_next()|
- "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()|
- For each of the gotos, auto open diagnostics is available as a
configuration option
- Configurable diagnostic handling:
- See |vim.lsp.diagnostic.on_publish_diagnostics()|
- Delay display until after insert mode
- Configure signs
- Configure virtual text
- Configure underline
- Set the location list with the buffers diagnostics.
- See |vim.lsp.diagnostic.set_loclist()|
- Better performance for getting counts and line diagnostics
- They are now cached on save, to enhance lookups.
- Particularly useful for checking in statusline, etc.
- Actual testing :)
- See ./test/functional/plugin/lsp/diagnostic_spec.lua
- Added `guisp` for underline highlighting
NOTE: "a little while" means enough time to feel like most plugins and
plugin authors have had a chance to refactor their code to use the
updated calls. Then we will remove them completely. There is no need to
keep them, because we don't have any released version of neovim that
exposes these APIs. I'm trying to be nice to people following HEAD :)
Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
|
|
|
|
| |
Missed this #12764. My bad :((
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactors how required capabilities are detected and validated, and make
sure requests are only sent to clients that support it (and only fail if
no clients support the provided method).
The validation happens at the buf_request level, because we assume that
if someone is sending the request directly through the client, they know
what they're doing. Also, let unknown methods go through.
This is extracted from #12518 and closes #12755.
Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
Language servers can already send log messages to the client while the
server is still being initialized.
This currently leads to "client has shut down" messages which are
confusing to the user as the server is properly starting.
To fix this this changes the `get_client_by_id` method to also return a
client if it is still initializing.
|
|\ |
|
| |
| |
| |
| | |
Unless we look at the code every time, we will not know what the value is, so add the key name.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
- remove redundant autocmd list
This "grouped" list is useless, it only gets in the way when searching
for event names.
- intro.txt: cleanup
- starting.txt: update, revisit
- doc: `:help bisect`
- mbyte.txt: update aliases 1656367b90bd. closes #11960
- options: remove 'guifontset'. Why:
- It is complicated and is used by almost no one.
- It is unlikely to be implemented by Nvim GUIs (complicated to parse,
specific to Xorg...).
|
| |
|
|
|
|
| |
Most of the lsp.log will be addressed in a separate PR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LSP: Add support for call hierarchies
* LSP: Add support for call hierarchies
* LSP: Add support for call hierarchies
* LSP: Jump to call location
Jump to the call site instead of jumping to the definition of the
caller/callee.
* LSP: add tests for the call hierarchy callbacks
* Fix linting error
Co-authored-by: Cédric Barreteau <>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix some small doc issues
* doc: fixup
* doc: fixup
* Fix lint and rebase
* Remove bad advice
* Ugh, stupid mpack files...
* Don't let people include these for now until they specifically want to
* Prevent duplicate tag
|
|
|
|
| |
fix: https://github.com/neovim/neovim/issues/12414
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
server before making `request` (#12421)
* Add check for typeDefinition support in vim lsp server
* Check for typeDefinitionProvider in server
* Check for declarationProvider in server
* Add check for client support
* Fix typo
|
| |
|
|
|
|
|
| |
* lsp.lua: make the error message more detailed
* test: add lsp._cmd_part test
|
|
|
|
|
|
|
|
| |
* lsp: add workspace/symbol
* refactor symbol callback
* set hierarchical symbol support to true
* add documentation and default mapping
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit creates 4 new highlight groups:
- LspDiagnosticsErrorSign
- LspDiagnosticsWarningSign
- LspDiagnosticsInformationSign
- LspDiagnosticsHintSign
These highlight groups are linked to their corresponding LspDiagnostics
highlight groups by default.
This lets users choose a different color for their sign columns and
virtualtext diagnostics.
|
|
|
|
|
| |
ref: #12164
fix #12201
sign_getdefined() returns a list, {} if the sign is not defined.
|
|
|
| |
fix #12162
|
|
|
|
| |
When we save the buffer, the buffer is detached and attached again.
So the client also needs to remove the buffer version once.
|
|\
| |
| | |
LSP: Use buffer version instead of changedtick for edits
|
| | |
|
| |
| |
| |
| | |
Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
|
| |
| |
| |
| |
| | |
DocumentSymbol type doesn't have location field.
So when we'll add 'textDocument/documentSymbol’ handler, we can't decide which file have we jump to.
|
|/
|
|
|
| |
* add support to show diagnostics count in statusline
* documentation
|
|
|
|
|
|
|
| |
fix: #11826
Some lanuguage servers return complementary candidates whose prefixes do not match are also returned.
So we exclude completion candidates whose prefix does not match.
ex) Microsoft python-language-server, rust-analyzer
|
|
|
|
|
| |
- `cmd_env` is a table not a function.
- tests: Set $NVIM_LOG_FILE for fake LSP server.
|
|
|
| |
and now only accepts a list of strings (instead of string or list).
|
|
|
| |
InitializeParams.rootPath is deprecated now. But some language servers still use it.
|
| |
|
|
|
|
|
| |
Reduce API surface. We should not add functions unless they are really
needed. Users should be nudged to use vim.inspect() directly.
|
|
|
|
|
|
| |
Reduce API surface. We don't need so many variations of functions. Too
many functions means verbose, largely redundant documentation, tests,
and cognitive burden.
|
| |
|
|
|
| |
reverts 680693e263576e34d5947c43ab0ae3ff0ebfeab5 #11603
|
|
|
|
| |
Since the client name is more obvious than the client id for the user, add an
API to get the lsp client by the client name.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- In the process, refactored focusable_preview to a util function.
- Add text for locations_to_items of the current line.
- Improve location callback to handle multiple return values by using
set_qflist.
- Remove update_tagstack and leave note for future travelers.
|
| |
|
|
|
|
|
|
| |
- Hide diagnostics on client exit
- Stop insert on popup focus.
- Hide popup on insertchar (for signature_help)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Use correct implementation of text_edits.
- Send indent options to rangeFormatting and formatting.
- Remove references to vim bindings and filetype from lsp.txt
- Add more examples to docs.
- Add before_init to allow changing initialize_params.
|
|\ |
|
| |
| |
| |
| |
| | |
Otherwise some servers like clangd will emit spurious
"no newline at end of file" warnings.
|