Commit Graph

43 Commits

Author SHA1 Message Date
Prabir Shrestha 6038748cb1 Improve completion perf (#1038)
* improve completion perf

* improve completion popup perf

* fix tests

* remove old s:get_vim_completion_item
2021-01-16 11:05:21 -08:00
Prabir Shrestha efd07d859e Revamp diagnostics highlights (#995) 2020-12-31 23:13:19 -08:00
Prabir Shrestha 5743ae2110 Diagnostics signs revamp (#994) 2020-12-31 01:23:26 -08:00
Prabir Shrestha 1489cf8295 Revamp diagnostics virtual text (#990) 2020-12-30 14:49:44 -08:00
bamchoh 5f23ecd388 Convert lowercase drive letters to uppercase (#953)
* Convert lowercase drive letters to uppercase

I faced a problem that error diagnostics message does not shown in golang source code. In a result of my investigation, this problem occurs when I change the current directory with lowercase driveletter like `cd c:\dev\go\test001`. When `cd C:\dev\go\test001` is no problem. To avoid this problem, we need to convert driver letter to uppercase in lsp#utils#path_to_uri function.

* Update utils.vimspec

* Revise a code in diagnostics.vim instead of utils.vim to reduce impact of modification

* Create a function to normalize uri

* Add a comment about normalize discussion

* Delete s:is_win check

* Revise comment for normalization of urls
2020-12-25 11:11:47 -08:00
mattn 6da958babd Fix 849: find nearest paths (#905) 2020-09-18 23:21:08 -07:00
John Schug 2ca2fe3854 Add support for the tagfunc option (#815)
* Add support for tagfunc option

* Consolidate various synchronous wait implementations

* Refactor to use lsp#utils#position#lsp_to_vim

Also marks get_symbol_text_from_kind as internal and fixes compatibility
with older vims.
2020-05-25 14:41:21 -07:00
Eivy c029ce1330 Jumping to diagnostics with command args '-nowrap' (#770)
* Add func 'lsp#utils#parse_command_options'

* Add wrap option to jumping to diagnostic

* Update doc

* Fix lint error

* Remove debug code
2020-05-02 18:41:55 -07:00
mattn 7ce02b0781 Fix lsp#utils#path_to_uri (#809)
This should accept URI
2020-04-30 21:55:22 +09:00
mattn aca92ddad4 Remove suffix (#723)
* Remove suffix

* Get default value in placeholder

* Fix make_valid_word

* Fix test
2020-02-19 15:21:47 +09:00
hrsh7th 3e207c0ee4 Change text edit implementation to support \r (#718)
* Change text edit implementation to support \r

* Fix edit on unloaded buffer

* Add \r\n tests

* Fix for perf

Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-15 00:39:40 +09:00
Fujiwara Takuya 52539a54ae Show diagnostics in a floating window (#700)
* fix comment

* fix indent

* support diagnostics in a floating window

* doc: add g:lsp_diagnostics_float_{cursor,delay}

* fix vint errors except unused variables

* suppress vint unused variable errors

* lint: use robust operator
2020-02-10 01:44:05 +09:00
mattn 2c9a2c6bdf Fix insert text (#688)
* Fix insert text

When insertTextFormat==2, it should prefer insertText. But it may include placeholder.
When insertTextFormat!=2, use insertText since it is plain-text.
When it have textEdit, the inserted text will be modified in later, so insert only word.
Otherwize, insert label since it should be what the server want to insert.

* Check with valid word pattern

* ":" should be invalid character

* Add lsp#utils#make_valid_word

* Add l: prefix

* Add test

* Add test

* \t should be ignored

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2020-01-28 14:41:30 +09:00
hrsh7th 64d514d14f Fix completion for clangd (#665)
* Fix completion for clangd

* Fix for old vim
2020-01-11 20:10:33 -08:00
hrsh7th fef60795ec Improve signature help with lexima.vim (#638)
* Improve signature help with lexima.vim

* Fix buffer change problem

* Display signature help after cursor jumped

* Fix event

* Add _ prefix for inner functions
2020-01-04 09:17:03 -08:00
Prabir Shrestha b02345d223 added lsp#utils#location#_lsp_to_vim_list (#647)
* added lsp#utils#location#_lsp_to_vim_list
* check of response.result
* remove lsp#ui#vim#utils#locations_to_loc_list
* refactor to use s:open_location
* use lsp#utils#is_file_uri
2020-01-01 16:10:33 -08:00
Prabir Shrestha 3aba91cf71 remove lsp#utils#to_col in favor of lsp#utils#position#_lsp_to_vim (#645)
* refactor to use lsp#utils#position#_lsp_to_vim
* remove lsp#utils#to_col in favor of lsp#utils#position#_lsp_to_vim
* fix doc
2020-01-01 13:33:36 -08:00
Thomas Faingnaert 094a49dccd Cache base64 alphabet (#634) 2019-12-27 11:47:33 +01:00
Thomas Faingnaert 2f725fb4c3 Implement semantic highlighting (#464) 2019-12-26 10:08:30 -08:00
machakann 3121f0a916 Multibyte-character support (Fix #425) (#490)
* Multibyte character support for lsp#get_position()

* Multibyte character support for "textDocument/documentHighlight"

* Fix `lsp#utils#byteindex()` would fails if a file is not yet loaded

* Add tests

* Rename lsp#utils#byteindex() and lsp#utils#charindex()

lsp#utils#byteindex() -> lsp#utils#to_col()
lsp#utils#charindex() -> lsp#utils#to_char()

* Multibyte character support for textEdit

* Remove unused line

* Multibyte character support for  "textDocument/rangeFormatting"

* Multibyte character support for  "textDocument/publishDiagnostics"
2019-09-08 09:13:09 -07:00
machakann 73d98fc328 Rename lsp#utils#byteindex to lsp#utils#to_col 2019-08-20 19:42:21 +08:00
Unknown 83a3a2b004 Fix an lsp#utils#byteindex() error when the target buffer is not yet loaded 2019-08-14 22:08:12 +08:00
machakann 1a22e19ee0 Add a comment 2019-08-14 19:00:35 +08:00
Unknown 9906e085f1 Convert character-index to byte-index for textprop and location-list 2019-08-12 22:14:34 +08:00
Colin Cheng c91d0d52e5 Fix echo diagnostics message with showcmd (#433) 2019-07-14 11:28:31 -07:00
Colin Cheng 3deb1fb2f0 Fix echo diagnostics truncation (#379)
In multiple vertical split windows, diagnostics message echo in statusline is
too short, this patch will check multiple windows and fix it.
2019-05-12 22:39:05 -07:00
IceNature fe2ec6e040 Search for multiple file/dir names in lsp#utils#find_nearest_parent_file_directory (#373)
* Search for multiple file/dir names in lsp#utils#find_nearest_parent_file_directory

* Add tests for lsp#utils#find_nearest_parent_file_directory

* Document lsp#utils#find_nearest_parent_file_directory
2019-05-12 22:33:38 -07:00
Yasuhiro Matsumoto 0264137f6a Fix test 2019-01-29 11:46:55 +09:00
Yasuhiro Matsumoto 55c145e21b path should not contain query 2019-01-29 11:38:55 +09:00
Yasuhiro Matsumoto 52e1b05f29 Fix index 2019-01-29 11:17:03 +09:00
Yasuhiro Matsumoto 84e80a5e99 Fix bug 2019-01-29 11:17:02 +09:00
Yasuhiro Matsumoto 541f0ca4b9 vint 2019-01-29 11:16:59 +09:00
Yasuhiro Matsumoto 7e41c89a30 Remove reference to original code since it's not same at least. 2019-01-28 16:18:59 +09:00
Yasuhiro Matsumoto 17ecbd4a7a Fix s:decode_uri
Substitute '+' to ' ' must not apply for path. Just for query.
2019-01-28 16:15:08 +09:00
smhc 14225b5b19 Handle showcmd enabled (#205)
* Handle showcmd enabled

* Also handle ruler if not using statusline

* Better handle case of statusline enabled

* Set theme jekyll-theme-merlot

* Only truncate and add ellipses if there is room

* Removed _config.yml file

* Message output handles showcmd and ruler enabled
2019-01-01 18:34:45 -08:00
mattn fac0429cd8 Handle lower-case drive-letter (#208) 2018-12-11 15:35:56 -08:00
Prabir Shrestha 82375012d0 Truncate diagnostics cursor message when message is too long (#191)
* truncate diagnostics message

* fix echo with truncation
2018-10-13 11:15:13 -07:00
Augusto Melo 6e69ebd199 Fix lsp#utils#path_to_uri for windows (#156)
* Fix lsp#utils#path_to_uri for windows

When encoding the buffer path on Windows the path_to_uri transformed the
C: to C%3A causing problems to LSP functions.

To solve this it as necessary to change the function encode_uri to
receive the start position to encode, so the functions that call it can
specify were to start the encoding.

* Fixed range intervals

When you specify the max on the function range that it will become
inclusive so you need to decrease one of the length since the arrays
starts at 0
2018-07-26 11:53:38 -07:00
Pavel Davydov f588b27e1a Percent-decode uri from language server to fix issue #106 (#107)
* add lsp#utils#decode_uri to fix issue with c++ standard library headers (#106)

* make decode uri function private (#106)

* add reference and license link for decode uri function (#106)

* rename variables to match project coding standards (#106)

* decode uri before substituting slashes in path on windows (#106)

* add uri encoding to path_to_uri method (#106)
2018-03-15 20:41:21 -07:00
Tristan Konolige a070ef4ac8 Print error message when server fails to initialize (#113)
* Print error message when server fails to initialize
* move error_msg to utils.vim
* rename error_msg to lsp#utils#error
2018-03-14 23:08:24 -07:00
Łukasz Jan Niemier 203d682e30 Create preview window instead of using quickfix list (#78)
* Create preview window instead of using quickfix list

This removes from us burden of providing formatting for content as this
is now simple as setting proper filetype.

* Create custom filetype for preview window

This will allow users to provide their own mappings and features in
hover window easily.

* Add proper statusline for LSP Hover

* Guard and undo_ftplugin

* Support all LSP hover syntaxes
2018-01-01 13:29:50 -08:00
Prabir Shrestha cf47780ebc add support for omnifunc - #25
autocmd FileType typescript setlocal omnifunc=lsp#complete
2017-08-25 21:02:38 -07:00
Prabir Shrestha 2802c39ca0 move utils to lsp#utils#... 2017-08-12 14:48:36 -07:00