Commit Graph

17 Commits

Author SHA1 Message Date
mattn
516fd7ce95 diagnostics list can be v:null (#1190)
* diagnostics list can be v:null

Ref #1186

* ditto

* Small refactoring

* Use lsp#utils#iteratable for the list which possibly be v:null
2021-06-09 01:51:59 +09: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
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
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
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
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
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
machakann
ccb2460fa6 Add tests for lsp#utils#byteindex() 2019-08-17 14:38:56 +08: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
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
Prabir Shrestha
fa53543d91 add themis tests (#240) 2019-01-13 01:18:44 -08:00