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
Ashkan Kiani
2d580756ca
Add everything to lsp.buf and get rid of autoload.
2019-11-20 15:35:18 -08:00
Ashkan Kiani
c83380cf80
Add lsp.buf and hover implementation.
2019-11-20 14:21:57 -08:00
Ashkan Kiani
ff65cc990a
Bugfix. Don't use nvim.lua that doesn't exist :)
2019-11-20 11:41:45 -08:00
Ashkan Kiani
568b454088
Add vim.uri_to_bufnr
2019-11-20 11:39:54 -08:00
Ashkan Kiani
0904ffe387
Bugfixes.
...
- Return after an error in RPC.
- Use an empty vim table for serialization.
2019-11-20 11:36:50 -08:00
Ashkan Kiani
3ae9b3781e
Bugfix for floating_preview
...
Don't modify your inputs.
2019-11-20 11:34:10 -08:00
Ashkan Kiani
69a0712a9c
Reduce code blocks in markdown previews.
...
If the preview is just a code block, then use the language as the
filetype instead of using markdown.
This reduces the size of the preview.
2019-11-20 11:23:50 -08:00
Ashkan Kiani
00dc12c5d8
lua LSP client: initial implementation ( #11336 )
...
Mainly configuration and RPC infrastructure can be considered "done". Specific requests and their callbacks will be improved later (and also served by plugins). There are also some TODO:s for the client itself, like incremental updates.
Co-authored by at-tjdevries and at-h-michael, with many review/suggestion contributions.
2019-11-13 21:55:26 +01:00
Justin M. Keyes
a0d992785f
Lua: Use vim.validate() instead of assert()
2019-11-10 23:43:49 -08:00
Justin M. Keyes
7aa4042d3b
Lua: vim.validate()
2019-11-10 23:43:49 -08:00
Hirokazu Hata
678a51b1da
Lua: vim.validate()
...
We often want to do type checking of public function arguments.
- test: Rename utility_function_spec.lua to vim_spec.lua
- .luacov: Map lua module names
2019-11-10 22:50:24 -08:00
Björn Linse
474d0bcbf7
lua: vim.rpcrequest, vim.rpcnotify, vim.NIL
2019-11-10 13:08:05 +01:00
Hirokazu Hata
c2fc4255f9
runtime: Use module pattern with vim/shared.lua
...
It's a bit cumbersome for us to add an export target every time we define a new function.
It's also cumbersome to care about the order of definition when creating a new function by referring to other functions in the module.
2019-10-23 10:50:42 +09:00
Hirokazu Hata
996a057fb9
lua/stdlib: adjust some validation messages #11271
...
close #11271
2019-10-26 00:27:01 -07:00
Björn Linse
c844f986d4
tree-sitter: use "module" pattern in lua source
2019-09-28 17:46:25 +02:00
Björn Linse
f86a2c33a2
tree-sitter: simplify editing using the new old_byte_size parameter
2019-09-28 17:46:25 +02:00
Björn Linse
06ee45b9b1
tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests)
2019-09-28 17:46:25 +02:00
Björn Linse
167a1cfdef
tree-sitter: improve parser API (shared parser between plugins)
2019-09-28 14:55:43 +02:00
Björn Linse
d24dec596c
tree-sitter: inspect language
2019-09-28 14:55:43 +02:00
Björn Linse
c8f861b739
tree-sitter: rename tree_sitter => treesitter for consistency
2019-09-28 14:55:43 +02:00
Björn Linse
4ea5e63aa8
tree-sitter: add basic testing on ci
...
build tree-sitter c parser on ci for testing purposes
2019-09-28 14:55:43 +02:00
Björn Linse
afba23099f
tree-sitter: support pre-registration of languages
2019-09-28 14:55:43 +02:00
Björn Linse
1e9e2451be
tree-sitter: objectify API
2019-09-28 14:55:43 +02:00
Björn Linse
005b6d638c
tree-sitter: split tree-sitter lua interface from demo code
2019-09-28 14:55:43 +02:00
Björn Linse
0e0beef85e
tree-sitter: load parsers as .so files
2019-09-28 14:31:03 +02:00
Björn Linse
cd10096386
tree-sitter: initial tree-sitter support
2019-09-28 14:31:03 +02:00
Justin M. Keyes
af946046b9
test: Rename meth_pcall to pcall_err
...
- Rename `meth_pcall`.
- Make `pcall_err` raise an error if the function does not fail.
- Add `vim.pesc()` to treat a string as literal where a Lua pattern is
expected.
2019-09-06 17:19:07 -07:00
Kovas Palunas
fdd8dcae01
man.vim: Handle ANSI escape sequences with ":" #10267
...
closes #10267
2019-06-30 15:25:49 +02:00
Justin M. Keyes
4769deb36a
doc #10017
...
- gen_vimdoc.py: fancy "bullet"
- rework `:help channel-callback`
- rename `:help buffered` to `:help channel-buffered`
2019-05-25 10:00:41 +02:00
Justin M. Keyes
5b04a4fa09
lua/shared: share trim() impl
2019-05-20 23:46:56 +02:00
Justin M. Keyes
5c13f368c6
lint
2019-05-19 21:26:33 +02:00
Justin M. Keyes
fab81cfb04
lua/shared: share more stuff
...
Leave trim() in vim.lua, because gen_vimdoc.py needs at least one
function in there, else it gets confused...
2019-05-19 18:31:40 +02:00