54 Commits
Author SHA1 Message Date
Hirokazu Hata 10a5f40f9e Merge pull request #13386 from glepnir/glepnir-patch-1 2020-11-26 17:00:49 +09: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
Hirokazu Hata 7efb302d26 Merge pull request #12252 from dlukes/formatting-sync 2020-06-27 11:27:51 +09:00
Hirokazu Hata e628a05b51 Merge pull request #12342 from h-michael/fix-doc 2020-06-15 18:08:34 +09:00
Hirokazu Hata 52cd8bf507 doc: fix vim.api.nvim_buf_attach callback arguments 2020-06-15 12:30:13 +09:00
Hirokazu Hata 6613ab6bca Merge pull request #12469 from h-michael/request
lsp: even if contents before change is 0 byte, request to server
2020-06-15 11:11:42 +09:00
Hirokazu Hata e39ec50d73 lsp: even if contents before change is 0 byte, request to server
fix: https://github.com/neovim/neovim/issues/12414
2020-06-11 13:09:05 +09:00
Hirokazu Hata e78658348d Merge pull request #12467 from h-michael/issue-template
issue template: fix label syntax for lsp bug report
2020-06-11 09:42:35 +09:00
Hirokazu Hata d7f2318ada issue template: fix label syntax for lsp bug report 2020-06-11 08:18:12 +09:00
Hirokazu Hata bb946fb475 Merge pull request #12461 from h-michael/issue-template 2020-06-11 08:08:32 +09:00
Hirokazu Hata 9aba7f122c add GitHub issue template for lsp 2020-06-11 06:12:37 +09:00
Hirokazu Hata 96568d5b07 Merge pull request #12343 from ndreas/fix/lsp-multibyte-indexing
Fix LSP multibyte indexing
2020-06-04 12:16:42 +09:00
Hirokazu Hata 15b762761a lsp: make the command error message more detailed (#11633)
* lsp.lua: make the error message more detailed

* test: add lsp._cmd_part test
2020-05-26 08:55:45 -04:00
Hirokazu Hata b996205969 Merge pull request #12367 from h-michael/lsp-log 2020-05-25 11:56:42 +09:00
Hirokazu Hata e0e5ada2bf lsp: change log name to "lsp.log" from "vim-lsp.log"
It's confusing because vim-lsp already has the same name as the plugin name that predates this built-in lsp.
Also, since "vim.fn.stdpath" is used, adding the prefix "nvim-" is redundant, so just "lsp.log" will suffice.
2020-05-23 15:02:38 +09:00
Hirokazu Hata 74fed7d50f Merge pull request #12338 from h-michael/fix-flaky 2020-05-19 10:18:05 +09:00
Hirokazu Hata eabf1803cd test: fix flaky vim.defer_fn test 2020-05-19 00:02:14 +09:00
Hirokazu Hata ae5bd0454e lua: add tbl_deep_extend (#11969) 2020-05-17 13:24:34 -04:00
Hirokazu Hata f3d0a1741e Merge pull request #12324 from alindeman/nil-code-actions 2020-05-16 11:58:54 +09:00
Hirokazu Hata 9a67b030d9 lsp: Handle unknown CompletionItemKind and SymbolKind (#12257)
* lsp: handle kinds not specified in protocol

fix: #12200
If the client set "symbolKind.valueSet",
the client must handle it properly even if it receives a value outside the specification.

* test: add lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} test case

* lsp: make lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} private
2020-05-07 16:23:25 -04:00
Hirokazu Hata 67634da714 lsp: add a lsp.util.apply_text_edits test(pending)
We don't handle non-ASCII characters well in UTF-16.
So I add a non-ASCII characters test case.
2020-05-04 09:05:16 +09:00
Hirokazu Hata 0107a194fa lsp: fix apply_text_document_edit test
lsp.util.buf_versions must be set in advance.
Use helper.insert to create an anonymous buffer,
so create a named buffer for testing without using insert.
2020-05-04 08:10:27 +09:00
Hirokazu Hata 3eae7d52c5 lsp: add lsp.util.symbols_to_items test 2020-05-02 15:16:43 +09:00
Hirokazu Hata d0af0f5c9e lsp: fix lsp.util.symbols_to_items
fix: https://github.com/neovim/neovim/pull/11931#issuecomment-622422581

There was an error in the process of flattening the hierarchical structure.
So when DocumentSymbol has children, our client can't handle it correctly.
2020-05-02 15:16:35 +09:00
Hirokazu Hata 4e6531ddbd lsp: use vim.tbl_isempty to check sign (#12190)
ref: #12164
fix #12201
sign_getdefined() returns a list, {} if the sign is not defined.
2020-04-28 07:41:39 -07:00
Hirokazu Hata 78d58eaf61 lsp: remove buffer version on buffer_detach (#12029)
When we save the buffer, the buffer is detached and attached again.
So the client also needs to remove the buffer version once.
2020-04-25 14:58:35 +02:00
Hirokazu Hata 633322a020 lsp: do not assert even if the code does not exist in ErrorCodes (#11981)
There is ErrorCodes in the LSP specification, but in ResponseError.code
it is not used and the actual type is number.
Some language servers response original error cods and this is valid spec.
So we shouldn't assert even if the code does not exist in ErrorCodes.

ref: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#responseMessage
2020-04-21 15:42:48 +02:00
Hirokazu Hata 2a5d766581 doc: fix vim.lsp.stop_all_clients doc (#12055) 2020-04-21 14:51:51 +02:00
Hirokazu Hata adec9fb444 lsp: export convert_signature_help_to_markdown_lines (#11950)
This function is also useful for users to create their own `textDocument/signatureHelp` callback function.
2020-04-19 23:40:54 +02:00
Hirokazu Hata c5466ba6ef lsp: replace the event that closes the signature help preview window from InsertCharPre to CursolMovedI (#11954)
In the case of InsertCharPre, it is inconvenient because the signature help is displayed
when backspaced in insert mode, so change it to CursolMovedI.
2020-04-18 19:04:47 +02:00
Hirokazu Hata 4139678f97 vim.uri: fix uri_to_fname (#12059)
fix: #12056
If the colon of the drive letter of windows is URI encoded,
it doesn't match the expected pattern, so decode it first.
2020-03-30 14:30:24 +02:00
Hirokazu Hata fbc4c4fd36 lsp: make showMessage and logMessage callbacks different (#11942)
According to the LSP specification, showMessage is what is displayed and logMessage is what is stored.
Since these are different things, I devide the callback into those that match.
2020-03-02 14:27:30 +01:00
Hirokazu Hata e35ff7371f lua: add vim.tbl_len() #11889 2020-03-01 23:38:43 -08:00
Hirokazu Hata 16262472cd lsp: add 'textDocument/documentSymbol’ callback
Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
2020-03-01 09:10:02 +09:00
Hirokazu Hata f157fdef7e lsp: add bufnr to callback function arguments
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.
2020-02-28 09:03:17 +09:00
Hirokazu Hata 599a12e316 clang/scan-build: restore required code
ref: https://github.com/neovim/neovim/pull/11900#discussion_r381860165
2020-02-23 10:14:05 +09:00
Hirokazu Hata 521b79c0f8 clang/scan-build: fix dead stores #11900 2020-02-18 20:54:19 -08:00
Hirokazu Hata f3d4ddd0f8 lsp: make functions private and use filter function 2020-02-19 07:39:56 +09:00
Hirokazu Hata c1bfc8093f lsp: respect the sort order if there is sortText 2020-02-19 07:27:35 +09:00
Hirokazu Hata 4ac376740c lsp: fix textDocument/completion handling
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
2020-02-19 07:27:29 +09:00
Hirokazu Hata e2ed8053bf lua: move test helper function, map and filter, to vim.shared module 2020-02-18 17:43:10 +09:00
Hirokazu Hata cdb729b746 lua: add vim.tbl_extend and vim.deepcopy test 2020-02-14 22:36:21 +09:00
Hirokazu Hata c230c7d1a6 lua: if second argument is vim.empty_dict(), vim.tbl_extend uses empty_dict() instead of {} 2020-02-14 19:35:46 +09:00
Hirokazu Hata 417fc6ccf7 lua: vim.deepcopy uses empty_dict() instead of {} for empty_dict()
fix: https://github.com/neovim/nvim-lsp/issues/94
2020-02-13 11:55:43 +09:00
Hirokazu Hata 032ede0203 test: add json_encode test for vim.empty_dict() 2020-02-12 21:08:12 +09:00
Hirokazu Hata dd8b29cfe2 LSP: set InitializeParams.rootPath value #11838
InitializeParams.rootPath is deprecated now. But some language servers still use it.
2020-02-08 22:51:02 -08: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
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
Hirokazu Hata f9da267373 scripts/lua2dox.lua: Remove class declaration block
Judging class definitions in the form "string.find (line, '=% s * class% (')"
must force writing class definitions in this format, but such a mechanism is Absent.
Also, Lua has no formal class in the language specification, and implements inheritance with setmetadable.
To detect this, we should have a parser for it, not a simple regular expression.
2019-10-27 11:58:28 +09:00
Hirokazu Hata 996a057fb9 lua/stdlib: adjust some validation messages #11271
close #11271
2019-10-26 00:27:01 -07: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 02393a0c74 ci/install.sh: pin treesitter to v0.15.9 #11266
When "tree-sitter test" is executed, query test is also executed, but "tree-sitter-c" does not have query test yet, so cli version that does not include query test execution To use.

ref https://github.com/tree-sitter/tree-sitter/commit/e14e285a1087264a8c74a7c62fcaecc49db9d904
2019-10-20 22:53:00 -07:00
Hirokazu Hata fbb2cd791d vim-patch:7.4.1179 (#5112)
Problem:    test_writefile and test_viml do not delete the tempfile.
Solution:   Delete the tempfile. (Charles Cooper)  Add DeleteTheScript().

https://github.com/vim/vim/commit/f4f79b84a5595c511f6fdbe4e3e1d188d97879a0
2016-07-25 08:12:24 -04:00