| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| | |
change hl groups for the example
rename borders -> border
|
|/
|
|
| |
* remove left/right padding feature from trim_and_pad
* use invisible borders by default on floating windows
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
lsp: add custom syntax rule for floating window
|
| | |
|
|/
|
|
|
| |
* Implementation derived from and validated by vim-lsc authored by Nate
Bosch
|
|
|
|
|
| |
vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release.
Use vim.lsp.handlers instead.
|
|
|
|
|
|
| |
`lines` can be empty, in which case `#lines[#lines]` failed with an
error:
lsp/util.lua:214: attempt to get length of a nil value
|
|
|
|
|
|
|
|
| |
`pumvisible()` returns a number, and numbers are always `true` in Lua,
so the return value needs to be checked explicitly.
Using https://github.com/neovim/neovim/pull/12900 as context, it appears
the intention was to move into the `if` branch when the completion popup
is not shown (i.e. `vim.fn.pumvisible() == 0`).
|
|
|
|
|
|
|
| |
* fix: Allow subsequent text document edits to pass
* fixup: cleaner code
* add tests
|
|
|
|
| |
nvim-lspconfig
|
|
|
|
| |
Heavily inspired by https://github.com/nvim-lua/lsp-status.nvim.
listen to the LspProgressUpdate event to update your statusline.
|
| |
|
| |
|
|
|
| |
Fixes #13429.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
| |
* lsp: remove vim.NIL from processing
* lsp: remove instances of vim.NIL
|
| |
|
|
|
|
| |
the call to math.min
|
|
|
|
| |
* fix insert_separator conditional
* only draw separator over wrapped width
|
|
|
|
|
| |
Allows to execute code_action for a given range.
:'<,'>lua vim.lsp.buf.range_code_action()
|
|
|
|
|
| |
* fix failed switch window error
* checks if window already exists
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fix #12623
problem: nvim_buf_get_lines(0) returns empty during startup, where no buffers are loaded yet.
solution: return empty object
Happens during startup, where buffer may not be loaded yet, because...
`source_startup_scripts()` is done before `edit_buffers()`:
https://github.com/neovim/neovim/blob/9bb552875d205d2f869c66137563f93b77a6d08e/src/nvim/main.c#L362
https://github.com/neovim/neovim/blob/9bb552875d205d2f869c66137563f93b77a6d08e/src/nvim/main.c#L480
|
|
|
|
|
|
| |
The spec indicates we have to fallback to comparing by label
if sortText is falsy.
Closes #12431
|
| |
|
|
|
|
| |
Most of the lsp.log will be addressed in a separate PR.
|
| |
|
|
|
| |
This reverts commit 44fe8828f06a22bc9aa3617a6fd8aae447a838de.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* add vertical padding to floats
* add max_width, max_height option to float methods
* lint
* lintlint
* guard against nil wrap_at
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* LSP: Add tests & use nvim_buf_get_lines in locations_to_items
This is to add support for cases where the server returns a URI in the
locations that does not have a file scheme but needs to be loaded via a
BufReadCmd event.
* LSP: Don't iterate through all lines in locations_to_items
* fixup! LSP: Don't iterate through all lines in locations_to_items
* fixup! fixup! LSP: Don't iterate through all lines in locations_to_items
* fixup! fixup! fixup! LSP: Don't iterate through all lines in locations_to_items
|
|\ |
|
| |
| |
| |
| |
| | |
Also, factor out a `vim.lsp.util.get_effective_tabstop()` helper and add
tests for it.
|
|/
|
|
|
|
|
|
|
|
|
| |
The client creates buffers on the fly to be able to apply text edits on
files that weren't previously open, which is great, but it uses the
bufadd() function, which creates unlisted buffers and can lead to a
weird experience in the text editor. Setting the buffer to buflisted
fixes this.
Closes #12488.
Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
* lsp: support custom hl groups in show_line_diagnostics
Closes #12472.
* runtime: add docs for the new lsp highlight groups
Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
According to the LSP spec[1], multiple edits can have the same starting
position, and if that is the case, they should be applied in the order
as they come in the array.
The implementation uses a reverse sort to not interfere with non applied
edits, but failed to take into account the spec.
[1] https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#textedit
|
|
|
| |
else popup window remains open when switching buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* take wrapping into account when computing float height
* factor out size calculation
* add test
* accept and pass through opts.wrap_at in floating_preview
* make padding configurable
* slightly refactor fancy_floating_markdown to make use of make_position
* padding using string.format
* move trim and pad to separate function
* nit
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
* remove mention of backward compat
* make lint happy
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
|