Commit Graph

163 Commits

Author SHA1 Message Date
Mathias Fußenegger
ef0398fe88
LSP: Expose diagnostics grouped by bufnr (#11932)
Expose `vim.lsp.buf.diagnostics_by_buf`

This makes it easier to customize the diagnostics behavior. For example
to defer the update they can override the
`textDocument/publishDiagnostics` callback to only call
`buf_diagnostics_save_positions` and then defer the other actions to a
autocmd event.
2020-04-25 15:46:58 +02:00
Andrey Avramenko
49045b173e test: add docs for get_completion_word test 2020-04-20 20:20:14 +03:00
Andrey Avramenko
a0d2bfeeb5 test: add get_completion_word test for text_doc...
...ument_completion_list_to_complete_items
2020-04-20 18:35:54 +03: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
Justin M. Keyes
b353a5c05f
test: always dump logs on failure #11886
Whenever `eq()`, `ok()`, etc. fails, include log tail in the failure
message. This helps to correlate log messages with a particular test
failure.
2020-02-16 23:30:24 -08:00
Justin M. Keyes
6e13b9d261 test/LSP: assert contents of log file 2020-02-16 22:09:28 -08:00
Justin M. Keyes
4cf48dc329 test/LSP: dump logs on error
This will help debug CI flakey failures.

TODO: helpers.assert_log()  -- Explicitly check contents of the logfile.
2020-02-16 19:04:40 -08:00
Justin M. Keyes
1eb0f5371a LSP: fix validate_client_config
- `cmd_env` is a table not a function.
- tests: Set $NVIM_LOG_FILE for fake LSP server.
2020-02-16 17:53:33 -08:00
Justin M. Keyes
c15bd6cd27 test/LSP: use less-generic exit code
- os.exit(1) is too generic, since code 1 may be caused by Nvim exiting
  for some other reason.  Change it to os.exit(101).
- style: de-architect json_encode/json_decode calls.

Failure seen in travis macOS job:
https://travis-ci.org/neovim/neovim/jobs/647849133

    [  FAILED  ] test/functional/plugin/lsp_spec.lua@ 266 SP basic_init test should not send didOpen if the buffer closes before init
    test/functional/plugin/lsp_spec.lua:297: exit code
    Expected objects to be the same.
    Passed in:
    (number) 1
    Expected:
    (number) 0
    stack traceback:
      test/functional/plugin/lsp_spec.lua:297: in function 'on_exit'
      test/functional/plugin/lsp_spec.lua💯 in function 'test_rpc_server'
      test/functional/plugin/lsp_spec.lua:272: in function <test/functional/plugin/lsp_spec.lua:266>
2020-02-16 17:52:48 -08:00
Justin M. Keyes
b04165859d test: style 2020-02-16 17:24:21 -08:00
Justin M. Keyes
0a1c6d9a37 LSP: highlight groups test, doc 2020-01-08 22:18:18 -08:00
Justin M. Keyes
8c8681d594 test: hoist buf_lines() 2020-01-08 09:41:41 -08:00
Justin M. Keyes
844cd9cef1 test: just say no to hyper-granularity
- Move plugin/lsp/* to plugin/*
- Merge lsp/util_spec.lua into lsp_spec.lua
2020-01-08 09:30:59 -08:00