Commit Graph

3272 Commits

Author SHA1 Message Date
Oliver Marriott
ee4735881d fix(lsp): guard against negative diagnostic line numbers 2021-06-13 03:38:59 +10:00
Jan Edmund Lazo
d09b8ad715
Merge pull request #14761 from janlazo/vim-8.2.2966
vim-patch:8.2.{1702,2422,2966,2971,2974}
2021-06-11 21:07:47 -04:00
Björn Linse
81a6b70880
Merge pull request #14686 from shadmansaleh/feat/evaluate_plugin/lua
runtime: allow to use .lua files for most features defined as &rtp/{feature}/*.vim
2021-06-11 17:42:21 +02:00
Jan Edmund Lazo
8ebbeee1d0
vim-patch:8.2.2971: cannot yank a block without trailing spaces
Problem:    Cannot yank a block without trailing spaces.
Solution:   Add the "zy" command. (Christian Brabandt, closes vim/vim#8292)
544a38e44d
2021-06-10 22:58:15 -04:00
Michael Lingelbach
f9b9b82047 fix(lsp): cap diagnostic end range to buf length
Closes #14743
2021-06-10 22:16:34 -04:00
shadmansaleh
e1edc079dd refactor(source): Move lua file detection to do_source
So now :source can run lua files too :)

* feat: Add support for :[ranged]source for lua files
2021-06-11 01:01:03 +06:00
shadmansaleh
f000251e08 feat(runtime): Allow lua to be used in syntax 2021-06-11 01:01:03 +06:00
shadmansaleh
f256a18fef feat(runtime): Allow lua to be used in ftdetect 2021-06-11 01:01:02 +06:00
shadmansaleh
4dffe1ff2f feat(runtime): Allow lua to be used in indent 2021-06-11 01:01:02 +06:00
shadmansaleh
fd5e5d2715 feat(runtime): Allow lua to be used in ftplugin 2021-06-11 01:01:02 +06:00
shadmansaleh
68be8b99cf feat(runtime): Allow lua to be used in compiler 2021-06-11 01:01:02 +06:00
shadmansaleh
1e6c02510a feat(runtime): Allow lua to be used in colorschemes
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
2021-06-11 01:01:02 +06:00
shadmansaleh
687eb0b39f feat(startup): Source runtime/plugin/**/*.lua at startup
For opt plugins these files are sourced on `:packadd`

* `:runtime` Now can exexute lua files
2021-06-11 00:58:38 +06:00
marvim
04f9511715 docs: regenerate 2021-06-10 08:03:28 +00:00
Björn Linse
53791c0546
Merge pull request #14510 from urandom/doc_nvim_buf_set_extmark
Minor observational corrections to the nvim_buf_set_extmark documentation
2021-06-10 09:39:35 +02:00
Mathias Fussenegger
f03a4d616b feat(lsp): Split out a diagnostics_to_items function from set_loclist
Makes it easier to re-use the logic to populate the quickfix list
instead of the location list.
2021-06-07 18:24:32 +02:00
marvim
0819e1acf9 docs: regenerate 2021-06-06 10:23:07 +00:00
Michael Lingelbach
4ce61742cf
Merge pull request #14726 from folke/lsp_single_popup_per_buffer
fix(lsp): max 1 floating preview per buffer. Fixes #11508
2021-06-06 03:22:10 -07:00
Viktor Kojouharov
36d05845f7 feat(lsp): extend diagnostic.set_loclist
add option to show workspace diagnostic instead of the current buffer's
2021-06-06 09:59:46 +02:00
Michael Lingelbach
5902bed406 docs(lsp): fix locations_to_items docstring 2021-06-05 17:22:47 -07:00
Michael Lingelbach
36802b895f
Merge pull request #14730 from mjlbach/feature/open_loclist_on_win
fix(lsp): set_loclist should target current win
2021-06-05 17:12:55 -07:00
Michael Lingelbach
f214c19e2b
Merge pull request #14707 from ray-x/master
fix(lsp): floating window border size for string type
2021-06-05 15:00:07 -07:00
Michael Lingelbach
15abde1676 fix(lsp): set_loclist should target current win
Currently, for large number of diagnostics, the delay in populating
loclist may be sufficient for a user to switch to another window,
resulting in the loclist being populated on the wrong window.
2021-06-05 14:46:10 -07:00
Michael Lingelbach
d846bd7e06 feat(lsp): remove line from diagnostic quickfix
Adding the line takes up valuable horizontal screen space, and also
precludes using the quickfixtextfunc built into neovim due to the
harcoded `|`.
2021-06-05 13:39:30 -07:00
Folke Lemaitre
149efa9b2b
fix(lsp): max 1 floating preview per buffer. Fixes #11508 2021-06-05 10:13:01 +02:00
ray-x
351050a10f fix(lsp): floating window border size for string type 'none' and 'shadow' 2021-06-02 20:44:13 +10:00
marvim
2ebc28018e docs: regenerate 2021-06-02 00:43:13 +00:00
Jose Alvarez
d4caafacc1 fix(lsp): check mode in omnifunc callback 2021-06-01 22:13:21 +09:00
Michael Lingelbach
b10cda83fa
Merge pull request #14693 from shadmansaleh/enhance/lsp/make_focusable_parameter_configurable
feat(lsp): Make focusability of lsp float configurable
2021-06-01 04:32:59 -07:00
shadmansaleh
68d48e25b6 docs(lsp): Fix opts param not captured by docgen
In the documentation for `vim.lsp.util.open_floating_preview`
the opts table keys were prefixed with `--` instead of `---`,
preventing capture by docgen.
2021-06-01 17:29:06 +06:00
shadmansaleh
0bd34cb4ec feat(lsp): Make focusability of lsp float configurable
This pr allows the user to specify whether `lsp.utils.open_floating_preview`
is focusable via the `opts` parameter. Defaults to true.

It can be configured by setting the focusable key inside opts parameter:

```lua
vim.lsp.util.open_floating_preview(contents, syntax, {focusable = false})
```
2021-06-01 17:23:35 +06:00
Michael Lingelbach
64bdaef327
Merge pull request #14694 from folke/lsp_popup_border 2021-06-01 01:52:38 -07:00
Folke Lemaitre
0ece34cbb8
fix(lsp): properly handle border character list without highlight groups. Fixes #14691 2021-06-01 09:36:29 +02:00
Jan Edmund Lazo
e399731561
vim-patch:8.2.2914: cannot paste a block without adding padding
Problem:    Cannot paste a block without adding padding.
Solution:   Add "zp" and "zP" which paste without adding padding. (Christian
            Brabandt, closes vim/vim#8289)
2fa9384ca1

Cherry-pick Test_normal_z_error() from patch v8.2.0369.
2021-05-31 21:06:11 -04:00
Michael Lingelbach
638c29b7c9 fix(docs): delete duplicate tags 2021-05-31 11:51:02 -07:00
Michael Lingelbach
0866df4d6a
Merge pull request #14687 from kabouzeid/vim-docs
Updated vim docs
2021-05-31 11:27:58 -07:00
Michael Lingelbach
96dfa07642
Merge pull request #14635 from folke/lsp_get_lines
perf(lsp): get all lines from a file in one go (`locations_to_items`)
2021-05-31 11:12:23 -07:00
Karim Abou Zeid
07f81b3b05 docs: regenerate 2021-05-31 19:47:51 +02:00
Amirreza Askarpour
3cd688ff77
fix vim.opt:remove doc (#14664) 2021-05-30 00:09:30 -04:00
Michael Lingelbach
cabf8ab26b
Merge pull request #14649 from folke/lsp_float_refactor
refactor(lsp): consolidate the different floating window methods into `open_floating_preview`
2021-05-29 12:06:58 -07:00
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
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
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
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
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
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