Mathias Fußenegger
df726408d7
lsp: Fix "client has shut down" errors during initializing ( #13103 )
...
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.
2020-10-22 14:59:17 -04:00
Jan Edmund Lazo
9817d99140
Merge pull request #13043 from tkuneck/fix-min-float-win-size
...
[RDY] Opts.wrap_at is sometimes a bool, ensure it falls back to a valid num…
2020-10-17 22:30:01 -04:00
TJ DeVries
0ad5b34170
Merge pull request #12053 from tjdevries/tjdevries/nicer_validate
...
vim.validate(): include stacktrace in message
2020-10-17 16:47:18 -04:00
Thomas Vigouroux
95238598e4
treesitter: allow multiple highlighters per buffer
2020-10-12 18:23:14 +02:00
Thomas Vigouroux and Paul Burlumi
bdbc56f931
treesitter: allow custom parser for highlighter
...
Also allow to get parser ranges.
This will be useful for language injection, allowing us to tweak the
parser's ranges on the fly.
Update runtime/lua/vim/treesitter.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com >
2020-10-12 18:23:14 +02:00
Thomas Vigouroux and Paul Burlumi
d3f544002c
treesitter: runtime queries
...
Runtime queries just work like ftplugins, that is:
- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.
Queries can be found in the `queries` directory.
Update runtime/lua/vim/treesitter/query.lua
Co-authored-by: Paul Burlumi <paul@burlumi.com >
2020-10-11 21:18:28 +02:00
Björn Linse
0b615dae07
api: multiple decoration providers at once
2020-10-10 15:16:45 +02:00
Justin M. Keyes
8e77d70e29
test/vim.validate(): assert normalized stacktrace
...
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
2020-10-05 09:47:59 -04:00
TJ DeVries
aad7a74053
vim.validate(): include stacktrace in message
2020-10-05 09:47:59 -04:00
Tony Kuneck
6d066af27a
Opts.wrap_at is sometimes a bool, ensure it falls back to a valid number in the call to math.min
2020-10-04 01:06:44 -07:00
Christian Clason
e5d98d8569
LSP: Fix separator width on hover ( fixes #13006 , #12998 ) ( #13007 )
...
* fix insert_separator conditional
* only draw separator over wrapped width
2020-09-30 18:03:40 +02:00
Thomas Vigouroux
3c5141d2cf
treesitter: add string parser ( #13008 )
2020-09-30 09:32:43 -04:00
notomo
4a996bc431
lsp: Add vim.lsp.buf.range_code_action() ( #12962 )
...
Allows to execute code_action for a given range.
:'<,'>lua vim.lsp.buf.range_code_action()
2020-09-24 21:53:08 +02:00
Rasmus Ishøy Michelsen
4f8d98e583
lsp: Handle ContentModified the same way as RequestCancelled ( #12803 )
...
* Added the ContentModified error to be hidden from users, like RequestCancelled
* Fixed tests (and ill-formed lua code)
* Simplified if-expression
2020-09-22 21:54:34 +02:00
Raphael
569e75799d
lsp: remove popup No signature available. ( #12915 )
...
* lsp: remove popup No signature available.
If no signatures. we shouldn't popup No signature available ..It will make noise when use
` api.nvim_command("autocmd CompleteDone <buffer> lua vim.lsp.buf.signature_help()")`
* fix ci test failed remove whitespace
* print message when no signature help
* Add comment
2020-09-18 09:37:53 -04:00
Raphael
f34eeba2d8
lsp: fix failed switch window error ( #12900 )
...
* fix failed switch window error
* checks if window already exists
2020-09-14 11:03:02 -04:00
TJ DeVries
4a2618c817
doc: Add docs for uri functions ( #12887 )
2020-09-14 09:12:17 -04:00
Björn Linse
4042975df4
luahl: global the luahl
2020-09-13 07:46:39 +02:00
Thomas Vigouroux
e4b5efa51e
fix: use luahl in treesitter
2020-09-13 07:46:39 +02:00
beardedsakimonkey and tim apple
01ae5e7c38
lsp: fix lsp.buf.formatting_sync() null response ( #12752 )
...
Co-authored-by: tim apple <tim@tims-MacBook-Pro.local >
2020-09-12 18:39:52 +02:00
Xuyuan Pang
f3b5531ae8
lsp: Fix parameter markdown rendering for signature help ( #12832 )
2020-09-12 18:33:31 +02:00
Thomas Vigouroux
cf0e1bc1fe
wip trying to fix the highlighter
2020-09-09 21:22:21 +02:00
Björn Linse
9437327d5e
treesitter: use new on_bytes interface
...
This will significantly reduce the parsing work
needed e.g. when rehighlighting after every keypress
in insert mode.
Also add safety check for tree-sitter trying to read
past the end of a line. This can happen after we sent
an incorrect buffer update.
2020-09-09 21:22:21 +02:00
Thomas Vigouroux
1ff064126d
treesitter: revert wrong optimization in highlights
2020-09-09 16:00:19 +02:00
Thomas Vigouroux
c3e6b6119c
Merge pull request #12858 from kyazdani42/fix/no-ts-hl-without-query-value
...
treesitter: check hl group exists before passing it in nvim_get_hl_id_by_name
2020-09-06 17:18:47 +02:00
kiyan42
7e0c4e5329
apply bfredl suggestion
2020-09-06 15:32:24 +02:00
Björn Linse
9c929e7d23
lint: just bit twiddlin'
2020-09-06 11:25:23 +02:00
Thomas Vigouroux
20c1526552
treesitter: simplify match_preds
2020-09-06 10:30:39 +02:00
Thomas Vigouroux
2d6437f5fb
treesitter: use lua-match? instead of match?
2020-09-06 10:29:47 +02:00
Steven Sojka
fb55cb2d91
fix(highlight): compare rows vs columns in range highlight check ( #12852 )
2020-09-05 17:22:54 -04:00
kiyan42
981f3f17a0
treesitter: check hl group exists before passing it in nvim_get_hl_id_by_name
2020-09-05 21:43:40 +02:00
Björn Linse
1e14dacd08
Merge pull request #12847 from nvim-treesitter/ts-list-predicates
...
treesitter: allow to list supported predicates
2020-09-04 17:01:49 +02:00
Thomas Vigouroux
3fd6e3b923
treesitter: allow to list supported predicates
2020-09-04 15:24:23 +02:00
Thomas Vigouroux
1832d18083
treesitter: update to use buf_set_extmark
2020-09-03 15:40:31 +02:00
Justin M. Keyes
948e625e1e
Merge #12468 'lsp: logging'
2020-09-01 20:50:08 -07:00
Gıyaseddin Tanrıkulu
e86b15b25c
lsp/make_position_param(): handle empty buffer #12825
...
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
2020-09-01 20:45:47 -07:00
Stephan Seitz
b058c671d2
treesitter: avoid escaping complete query strings
...
Escape "\\" only for `vim-match?` not for `match?`
Fixes #12595
2020-08-31 17:24:38 +02:00
Justin M. Keyes
c2662210b5
docs, remove 'guifontset' #11708
...
- 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 1656367b90 . 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...).
2020-08-31 00:51:35 -07:00
Anmol Sethi
3229ba0cde
lsp: Fix bad sortText comparison ( #12485 )
...
The spec indicates we have to fallback to comparing by label
if sortText is falsy.
Closes #12431
2020-08-30 22:29:47 -07:00
Hirokazu Hata
3b1db74963
lsp: add key name to the output log value
...
Unless we look at the code every time, we will not know what the value is, so add the key name.
2020-08-26 12:06:07 +09:00
Hirokazu Hata
154cbe61c4
lsp: remove output log at rpc.notify
...
Since "rpc.send.payload" outputs the log with almost the same contents, delete the output here.
2020-08-26 12:06:07 +09:00
Patrice Peterson
b5782c3b81
Add FIXMEs
2020-08-23 13:48:27 +02:00
Patrice Peterson
ac05343a10
Add docs for most vim.lsp methods
...
Most of the lsp.log will be addressed in a separate PR.
2020-08-23 13:48:25 +02:00
TJ DeVries
aa48c1c724
Merge pull request #12739 from vigoux/ts-refactor-predicates
...
treesitter: refactor
2020-08-14 08:33:50 -04:00
Thomas Vigouroux
6a8dcfab4b
treesitter: allow to force predicate addition
2020-08-13 20:40:40 +02:00
Thomas Vigouroux
9564803d1a
treesitter: add predicate negation
2020-08-13 20:30:15 +02:00
Thomas Vigouroux
d7b12e58df
treesitter: add and test vim-match? predicate
2020-08-13 20:30:15 +02:00
Thomas Vigouroux
58e37d7df8
treesitter: add contains? predicate
2020-08-13 20:30:15 +02:00
Thomas Vigouroux
18c0e77528
treesitter(docs): update and refresh docs
2020-08-13 20:30:15 +02:00
Thomas Vigouroux
613068071e
treesitter: refactor and use lua regexes
2020-08-13 20:30:15 +02:00