Commit Graph

18258 Commits

Author SHA1 Message Date
Folke Lemaitre
64da499ac2
refactor(lsp): consolidate the different floating window methods into open_floating_preview 2021-05-29 13:42:15 +02:00
TJ DeVries
43956dea55
lua: Add vim.opt and fix scopes of vim.o (#13479)
* lua: Add vim.opt

* fixup: cleaning

* fixup: comments

* ty clason

* fixup: comments

* this is the last commit. period.
2021-05-28 17:24:48 +02:00
Pino Toscano
192ea01edd
cmake: install app icon in XDG hicolor icon theme (#14656)
Install the icon of the application in the hicolor XDG icon theme;
this way it can be properly loaded by XDG menus in the currently set
XDG icon theme, without looking in the legacy pixmaps location.
2021-05-27 22:37:24 +02:00
Michael Lingelbach
192f89ea1b
Merge pull request #14646 from mfussenegger/wipe-floating-markdown-bufs
lsp: Ensure floating markdown buffers are deleted on hide
2021-05-26 12:13:58 -07:00
Mathias Fussenegger
e06a73900f lsp: Ensure floating markdown buffers are deleted on hide
After the change to use fancy_floating_markdown for the signature help I
noticed that scratch buffers start to accumulate.
2021-05-26 19:27:04 +02:00
James McCoy
0b905be47b
Merge pull request #14607 from glacambre/fix_get_all_options_info_crash
[RDY] Generate PARAM_COUNT macro
2021-05-26 10:30:20 -04:00
Jan Edmund Lazo
fd91e73c57
Merge pull request #14640 from janlazo/vim-3ec3217f0491
vim-patch:3ec3217f0491,8.2.{2278,2885}
2021-05-26 09:13:30 -04:00
glacambre
0c8454f5bc Fix crash on :echo get_all_options_info()
Iterating over PARAM_COUNT is wrong as PARAM_COUNT also counts the last
element of the options array, which has a NULL fullname in order to
signal the end of the array.
2021-05-26 07:07:11 +02:00
Jan Edmund Lazo
a7061359b7
vim-patch:8.2.2278: falling back to old regexp engine can some patterns
Problem:    Falling back to old regexp engine can some patterns.
Solution:   Do not fall back once [[:lower:]] or [[:upper:]] is used.
            (Christian Brabandt, closes vim/vim#7572)
66c50c5653
2021-05-26 00:39:55 -04:00
Jan Edmund Lazo
7e0d50b16e
vim-patch:8.2.2885: searching for \%'> does not match linewise end of line
Problem:    searching for \%'> does not match linewise end of line. (Tim Chase)
Solution:   Match end of line if column is MAXCOL. (closes vim/vim#8238)
872bee557e
2021-05-26 00:16:32 -04:00
Jan Edmund Lazo
31ea80649d
vim-patch:3ec3217f0491
Update runtime files
3ec3217f04

Omit fuzzy-match in pattern.txt.
2021-05-25 22:11:04 -04:00
Folke Lemaitre
54c441c80b
perf(lsp): get all lines from a file in one go 2021-05-25 12:23:39 +02:00
Jan Edmund Lazo
a282a177d3
Merge pull request #14634 from janlazo/vim-8.2.2880
vim-patch:8.2.{511,1689,1957,2880,2884}
2021-05-24 16:59:14 -04:00
Jan Edmund Lazo
370e65ed7c
vim-patch:8.2.2884: not enough cscope code is covered by tests
Problem:    Not enough cscope code is covered by tests.
Solution:   Add a few test cases. (Dominique Pellé, closes vim/vim#8246)
1e469c72ee
2021-05-24 15:36:30 -04:00
Jan Edmund Lazo
25a088b0ad
vim-patch:8.2.0511: Cscope code not fully tested
Problem:    Cscope code not fully tested.
Solution:   Add more test cases. (Dominique Pelle, closes vim/vim#5886)
d7ffc0ba8c
2021-05-24 15:25:32 -04:00
Jan Edmund Lazo
1b0937dd89
test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
2021-05-24 15:25:32 -04:00
Jan Edmund Lazo
529d88c641
vim-patch:8.2.1689: 'colorcolumn' doesn't show in indent
Problem:    'colorcolumn' doesn't show in indent.
Solution:   Also draw the column when draw_state is WL_BRI or WL_SBR.
            (Alexey Demin, closes vim/vim#6948, closes vim/vim#6619)
ad5e5631c5
2021-05-24 13:13:00 -04:00
Jan Edmund Lazo
db3136d2ea
vim-patch:8.2.1957: diff and cursorcolumn highlighting don't mix
Problem:    Diff and cursorcolumn highlighting don't mix.
Solution:   Fix condition for what attribute to use. (Christian Brabandt,
            closes vim/vim#7258, closes vim/vim#7260)
fabc3ca896
2021-05-24 12:53:27 -04:00
Jan Edmund Lazo
6d932ccb1c
vim-patch:8.2.2880: unified diff fails if actually used
Problem:    Unified diff fails if actually used.
Solution:   Invoke :diffupdate in the test.  Fix the check for working external
            diff. (Ghjuvan Lacambre, Christian Brabandt, closes vim/vim#8197)
ad5c178a19
2021-05-24 12:38:02 -04:00
Jan Edmund Lazo
0a653f7ab9
vim-patch:8.2.2879: file extension .hsig not recognized (#14628)
Problem:    File extension .hsig not recognized.
Solution:   Use Haskell filetype for .hsig files. (Marcin Szamotulski,
            closes vim/vim#8236)
f5409dbf66
2021-05-23 17:15:38 -04:00
Jan Edmund Lazo
9d8a18aa56
vim-patch:8.2.2879: file extension .hsig not recognized (#14623)
Problem:    File extension .hsig not recognized.
Solution:   Use Haskell filetype for .hsig files. (Marcin Szamotulski,
            closes vim/vim#8236)
f5409dbf66
2021-05-23 16:28:10 -04:00
Michael Lingelbach
109fb51589
Merge pull request #14622 from mfussenegger/unmute-error-responses
lsp: Only mute RequestCancelled or ContentModified, but not other errors
2021-05-23 08:58:19 -07:00
Mathias Fussenegger
5d4717010c lsp: Only mute RequestCancelled or ContentModified, but not other errors
handlers passed to `lsp_buf_request` weren't called if the server
responded with an error that looks like this:

     "decoded", {
      error = {
        code = -32601,
        message = "No delegateCommandHandler for foo"
      },
      id = 5,
      jsonrpc = "2.0"
    }

An example where that happens is both eclipse.jdt.ls and the
haskell-language-server when invoking a command that doesn't exist:

    :lua vim.lsp.buf_request(
      0,
      'workspace/executeCommand',
      { command = 'foo' },
      function(err, _, res)
        print(vim.inspect(err), vim.inspect(res))
      end
    )
2021-05-23 17:04:19 +02:00
Jan Edmund Lazo
3fb3b548a6
Merge pull request #14619 from janlazo/vim-8.2.2772
vim-patch:8.2.{2772,2778}
2021-05-22 22:32:43 -04:00
Jan Edmund Lazo
59d550345d
vim-patch:8.2.2778: problem restoring 'packpath' in session
Problem:    Problem restoring 'packpath' in session.
Solution:   Let "skiprtp" also apply to 'packpath'.
d23b714d8b

Port Test_mksession_skiprtp() to lua functional test.
2021-05-22 17:32:24 -04:00
Jan Edmund Lazo
8415615b59
vim-patch:8.2.2772: problems when restoring 'runtimepath' from a session file
Problem:    Problems when restoring 'runtimepath' from a session file.
Solution:   Add the "skiprtp" item in 'sessionoptions'.
635bd60804

Allow "terminal" value for sessionoptions even if it's no-opt
because patch v8.0.1592 is not ported yet.

Omit vim9 test, Test_mksession_skiprtp().
2021-05-22 15:40:06 -04:00
Jan Edmund Lazo
8e5439182b
fixup! vim-patch:8.1.0734: the hlsearch state is not stored in a session file (#13547) 2021-05-22 15:36:48 -04:00
Michael Lingelbach
0cbe748da3
Merge pull request #14615 from folke/faster_locations_to_items
perf(lsp): `locations_to_items`: use libuv for unloaded buffers to get line
2021-05-22 10:58:45 -07:00
Folke Lemaitre
c98e4d1a2a
perf(lsp): locations_to_items use libuv for unloaded buffers to get line 2021-05-22 18:56:48 +02:00
Michael Lingelbach
5b2be75256
Merge pull request #14269 from fdschmidt93/fix/document_symbol_range
fix(lsp): prefer selectionRange over range for document symbols in vim.lsp.util.symbols_to_items
2021-05-22 09:18:03 -07:00
Michael Lingelbach
9c7ad33006
Merge pull request #14603 from folke/format_on_save
fix(lsp): allow apply_text_edits to append text (insert at last line)
2021-05-22 09:13:06 -07:00
Jan Edmund Lazo
449bbf5540
Merge pull request #14601 from janlazo/vim-8.1.2320
vim-patch:8.1.{2320,2339},8.2.{946,1591,2875}
2021-05-22 10:12:42 -04:00
Jan Edmund Lazo
486050ebc9
vim-patch:8.2.2875: cancelling inputlist() after a digit does not return zero
Problem:    Cancelling inputlist() after a digit does not return zero.
Solution:   Always return zero when cancelling. (closes vim/vim#8231)
5cf94577cf
2021-05-21 23:01:11 -04:00
Jan Edmund Lazo
39fdb86832
vim-patch:8.2.0946: cannot use "q" to cancel a number prompt
Problem:    Cannot use "q" to cancel a number prompt.
Solution:   Recognize "q" instead of ignoring it.
eebd555733
2021-05-21 23:01:11 -04:00
Jan Edmund Lazo
4dadbe64a0
vim-patch:8.2.1591: using winheight('.') in tests works but is wrong
Problem:    Using winheight('.') in tests works but is wrong.
Solution:   Use winheight(0). (issue vim/vim#6863)
c05d1c043a
2021-05-21 20:04:39 -04:00
Jan Edmund Lazo
994cc931d1
vim-patch:8.1.2339: insufficient testing for quickfix
Problem:    Insufficient testing for quickfix.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#5261)
70077dd1ca

TODO:
Debug the following off-by-one error:
call assert_equal(repeat('m', 1024), l[0].module)
2021-05-21 20:04:38 -04:00
Jan Edmund Lazo
83e48174e6
vim-patch:8.1.2320: insufficient test coverage for quickfix
Problem:    Insufficient test coverage for quickfix.
Solution:   Add more tests.  Fix uncovered problem. (Yegappan Lakshmanan,
            closes vim/vim#5238)
f9ae154c51
2021-05-21 20:04:38 -04:00
Thiago Mota Martins
6dd04ed5f6
doc/options: Removed vim-only text from ambiwidth. (#14602)
NeoVim always includes all features and doesn´t have termcap-options (t_u7).
2021-05-21 19:59:48 -04:00
Michael Lingelbach
efe33fc799
Merge pull request #14604 from folke/master
feat(lsp): use same formatting for `signature_help` as `hover`
2021-05-21 11:17:17 -07:00
Folke Lemaitre
bfdd750fce feat(lsp): use fancy_floating_markdown for signature_help 2021-05-21 19:55:30 +02:00
Folke Lemaitre
02390af5a6 fix(lsp): clear current_syntax before formatting fancy markdown region 2021-05-21 19:18:22 +02:00
Folke Lemaitre
262645b325 fix(lsp): preview_location options and syntax fallback 2021-05-21 19:16:50 +02:00
Folke Lemaitre
d09f53d8ec fix(lsp): allow apply_text_edits and set_lines to insert text after the last line. Fixes #14017 2021-05-21 09:06:00 +02:00
Michael Lingelbach
75992f2ad9
Merge pull request #14596 from folke/master
lsp: `lsp.util.fancy_floating_markdown` improvements
2021-05-20 23:41:34 -07:00
Thiago Mota Martins
de96626ad4
Fixed ttimeout documentation. (#14600)
ttimeout is a boolean. The correct command for this line is ":set ttimeoutlen=9999"
2021-05-20 18:39:41 -04:00
Folke Lemaitre
07f54201c7 feat(lsp): lsp.util.fancy_floating_markdown improvements
fix: fancy_floating_markdown: syn region must include keepend to make sure syntax regions are applied correctly. Fixes #14594

feat: fancy_floating_markdown: handle <pre></pre> code blocks as a markdown code block with plaintext

fix: possible nil check for markdown code blocks till end of buffer

refactor: only one check is needed to see if stripped[h.finish +1] is valid

fix(lsp): dont't set doc ownsyntax, since it breaks contained syntaxes. Set regions for the markdown blocks intsead

fix: apply markdown formatting for code blocks without a language

fix: use markdownCodeBlock when no language was set in a code block
2021-05-21 00:34:30 +02:00
Jan Edmund Lazo
713eaaed06
Merge pull request #14490 from kevinhwang91/qftf
vim-patch: 8.2.{0869,0933,0959} - port quickfixtextfunc
2021-05-20 17:54:52 -04:00
Thomas Vigouroux
3bd9cce368
Merge pull request #14575 from vigoux/virtualedit-bytes
fix(bufupdate): send events when inserting with virtualedit
2021-05-20 20:05:25 +02:00
kevinhwang91
d29148ffd8 Merge remote-tracking branch 'origin/master' into qftf 2021-05-20 21:15:31 +08:00
kevinhwang91
2dc0f81271 fixup! vim-patch:8.2.0959: using 'quickfixtextfunc' is a bit slow 2021-05-20 11:34:10 +08:00