Björn Linse
00c57c98df
treesitter: add standard &rtp/parser/ search path for parsers
2020-02-07 09:22:55 +01:00
Matthieu Coudron
e956ea7672
LSP: show diagnostic in qf/loclist #11777
...
instead of the content of the file at this line.
ref https://github.com/neovim/nvim-lsp/issues/69
2020-01-28 01:45:25 -08:00
Chris LaRose
c6ff23d7a0
terminal: absolute CWD in term:// URI #11289
...
This makes it possible to restore the working directory of :terminal
buffers when reading those buffers from a session file.
Fixes #11288
Co-authored-by: Justin M. Keyes <justinkz@gmail.com >
2020-01-26 00:24:42 -08:00
Justin M. Keyes
9231684986
doc [ci skip] #11656
2020-01-12 23:41:55 -08:00
Justin M. Keyes
0a1c6d9a37
LSP: highlight groups test, doc
2020-01-08 22:18:18 -08:00
Alvaro Muñoz
e616ec4394
LSP: differentiate diagnostic underline by severity
2020-01-08 08:50:02 -08:00
Ville Hakulinen
c241395b3d
LSP: place hover window by vertical space #11657
...
Make the hover window position itself vertically wherever is the most
space available.
2020-01-03 04:39:25 -08:00
Björn Linse
ea4127e9a7
lua: metatable for empty dict value
2020-01-01 19:26:29 +01:00
Justin M. Keyes
ac6ebfcc1d
LSP: eliminate lsp.print_debug_info…()
...
Reduce API surface. We should not add functions unless they are really
needed. Users should be nudged to use vim.inspect() directly.
2019-12-31 15:39:17 -08:00
Justin M. Keyes
8b84119650
LSP: eliminate lsp.stop_all_clients()
...
Reduce API surface. We don't need so many variations of functions. Too
many functions means verbose, largely redundant documentation, tests,
and cognitive burden.
2019-12-31 15:39:17 -08:00
Justin M. Keyes
b112fe828f
gen_vimdoc.py: generate LSP docs
2019-12-31 08:06:48 -08:00
Ashkan Kiani
34a59242a0
Revert "runtime: Add vim.lsp.get_client_by_name" #11623
...
reverts 680693e263
#11603
2019-12-29 09:05:32 +01:00
Hirokazu Hata
680693e263
runtime: Add vim.lsp.get_client_by_name ( #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.
2019-12-28 09:28:00 -08:00
Ashkan Kiani
07a2260e1d
LSP: Handle rpc RequestCancelled specifically. ( #11606 )
...
This was creating extra noise in errors that we should've been handling
internally.
Fixes #11515
2019-12-24 14:28:09 -08:00
Björn Linse
440695c296
tree-sitter: implement query functionality and highlighting prototype [skip.lint]
2019-12-22 12:51:46 +01:00
Ashkan Kiani
ee7ac469c6
LSP: Use async completion for omnifunc. ( #11578 )
2019-12-20 22:49:29 -08:00
Ashkan Kiani
026ba804d1
LSP: Improve the display of the default hover callback. ( #11576 )
...
Strips the code blocks from markdown and does syntax highlighting.
2019-12-20 02:50:37 -08:00
Mike Hartington
d00c624ba4
LSP: fix omnifunc findstart ( #11522 )
2019-12-20 02:46:47 -08:00
Jakub Łuczyński
30ed245d00
LSP: Add jump when calling gotodef ( #11521 )
2019-12-07 03:34:22 -08:00
Ashkan Kiani
70b6061666
Add vim.startswith and vim.endswith ( #11248 )
2019-12-01 05:32:55 -08:00
Björn Linse
950690e48a
lsp: allow the user to config LspDiagnosticError etc by standard means
2019-11-28 18:48:18 +01:00
Ashkan Kiani
6e8c5779cf
LSP: Move default buf callbacks to vim.lsp.callbacks ( #11452 )
...
- 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.
2019-11-26 05:59:40 -08:00
Justin M. Keyes
fd5710ae9a
doc + extmarks tweaks #11421
...
- nvim_buf_get_extmarks: rename "amount" => "limit"
- rename `set_extmark_index_from_obj`
2019-11-25 01:08:02 -08:00
Ashkan Kiani
a9036502dc
Bring vim into local scope
2019-11-24 03:14:03 -08:00
Ashkan Kiani
b35f6aa9dd
Add support for textDocument/references.
...
Add set_qflist and set_loclist.
- Also add locations_to_items, which calculates byte offsets for
character positions in files and avoids unnecessary operations.
2019-11-24 03:01:18 -08:00
Ashkan Kiani
b78fdd7ce5
Merge branch 'master' into lsp-followup
2019-11-24 02:29:23 -08:00
Ashkan Kiani
d0d38fc36e
Lua: vim.env, vim.{g,v,w,bo,wo} #11442
...
- Add vim variable meta accessors: vim.env, vim.{g,v,w,bo,wo}
- Redo gen_char_blob to generate multiple blobs instead of just one
so that multiple Lua modules can be inlined.
- Reorder vim.lua inclusion so that it can use previously defined C
functions and utility functions like vim.shared and vim.inspect things.
- Inline shared.lua into nvim, but also keep it available in runtime.
2019-11-24 02:28:48 -08:00
Ashkan Kiani
d410812311
UI tweaks.
...
- Hide diagnostics on client exit
- Stop insert on popup focus.
- Hide popup on insertchar (for signature_help)
2019-11-23 16:14:24 -08:00
Ashkan Kiani
73487f4130
Improve the character_offset code.
2019-11-22 00:31:10 -08:00
Ashkan Kiani
78991ffbf4
Improve performance of util.set_lines + bugfix
...
Also permit character_offset for col past the end of line (useful in
range formatting).
2019-11-22 00:02:04 -08:00
Ashkan Kiani
a3d67dac5f
Fix encoding translation in other places.
2019-11-21 16:23:12 -08:00
Ashkan Kiani
c055ca00ce
Remove comments.
2019-11-21 15:55:45 -08:00
Ashkan Kiani
43d73ee884
Fix position params for encoding.
2019-11-21 15:41:32 -08:00
Ashkan Kiani
da07e71b18
Account for character length in jump position.
2019-11-21 15:34:28 -08:00
Ashkan Kiani
b27965538d
Fix hovers staying on bufhidden
2019-11-21 15:20:32 -08:00
Ashkan Kiani
bcae04f6c6
Updates
...
- 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.
2019-11-21 15:19:06 -08:00
Ashkan Kiani
6a51401378
Merge remote-tracking branch 'origin/master' into lsp-followup
2019-11-21 10:04:32 -08:00
Björn Linse
76e0a8bd93
lsp: transmit "\n" after last line when 'eol' is set
...
Otherwise some servers like clangd will emit spurious
"no newline at end of file" warnings.
2019-11-21 11:12:57 +01:00
Ashkan Kiani
b7170f2d72
Remove resolve_bufnr/lualint
2019-11-20 20:59:52 -08:00
Ashkan Kiani
7bf766ad09
Use the apply_text_edits from util.
2019-11-20 20:59:12 -08:00
Ashkan Kiani
6d9f48ddcf
Fix reference in rename.
2019-11-20 20:57:21 -08:00
Ashkan Kiani
6fc409d593
Add full text_edit implementation.
...
- Implements textDocument/formatting, textDocument/rangeFormatting,
workspace/applyEdit.
TODO:
- still has edge cases around replacement probably. Only tested with
inserts on the same position.
2019-11-20 20:51:44 -08:00
Ashkan Kiani
b984f613c1
Extend list_extend to take start/finish.
2019-11-20 17:09:21 -08:00
Ashkan Kiani
9b7f956715
Use err_message in default_callbacks
2019-11-20 16:39:45 -08:00
Ashkan Kiani
4c7ef3754a
Satisfy lualint.
2019-11-20 16:37:23 -08:00
Ashkan Kiani
93beae4f31
Fix rename support.
2019-11-20 16:35:11 -08:00
Ashkan Kiani
1e16b3cf28
Spaces not tabs.
2019-11-20 16:16:36 -08:00
Ashkan Kiani
c40f8600d2
Change error writer to not be annoying.
2019-11-20 16:16:13 -08:00
Ashkan Kiani
03eb88848c
Change callback resolution to be dynamic.
...
This allows default_callbacks to be specified after client creation to
be considered. Also it simplifies the code.
2019-11-20 16:09:03 -08:00
Ashkan Kiani
a4b7004f48
Move everything to buf & default_callbacks
...
- Rename builtin_callbacks to default_callbacks and slightly change its
semantics:
- No longer contains the default implementations. Instead, any
default_callbacks will be used in preference for our .buf methods.
- Add this to the docs.
2019-11-20 16:03:32 -08:00