Commit Graph

31383 Commits

Author SHA1 Message Date
Evgeni Chasnovski
295920845e feat(highlight): make PmenuMatch and PmenuMatchSel bold
Problem: both `PmenuMatch` and `PmenuMatchSel` can provide helpful
  information about characters which actually match query in completion
  candidates. This is not as useful with default regular match, but much
  more useful with 'completopt+=fuzzy'.

Solution: make both highlight groups bold. This will also affect
  (i.e. benefit) other color schemes which do not define groups
  separately.
  This is possible since the recently merged changes to `PmenuMatch` and
  `PmenuMatchSel` combine attributes with underlying "base" groups.
  See PR 29980.
2024-10-31 09:47:40 +01:00
zeertzjq
8df6822507
test: fix files being left behind (#31004) 2024-10-31 00:04:51 +00:00
notomo
b4599acbf8
fix(lsp): correct hover result handling (#30995)
Problem: vim.lsp.buf.hover() displays "No information available" when client_id
is not 1.

Solution: use vim.tbl_isempty(tbl) instead of #tbl==0
2024-10-30 16:57:33 +01:00
zeertzjq
05d9e6a9e8
vim-patch:9.1.0822: topline might be changed in diff mode unexpectedly (#30988)
Problem:  topline might be changed in diff mode unexpectedly
          (Jaehwang Jung)
Solution: do not re-calculate topline, when using line() func
          in diff mode.

fixes: vim/vim#15812
closes: vim/vim#15950

05a40e07c2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-30 09:05:11 +08:00
Gregory Anders
ff93cccbc1
fix(defaults): omit extraneous info from unimpaired mapping errors (#30983) 2024-10-29 10:06:14 -05:00
Kai Moschcau
4c7f5032af
docs(options): shell-powershell #30969
`-NonInteractive` at least somewhat hints to pwsh/powershell, that shell
sessions created from :! are not interactive, though even that is not
foolproof, because powershell is weird.
`$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell
to omit ANSI escape sequences in its output.
2024-10-29 07:36:58 -07:00
Lewis Russell
2cd6abf0d7
Merge pull request #30935 from lewis6991/feat/lsp_multi_hover 2024-10-29 09:51:14 +00:00
Lewis Russell
8260e4860b feat(lsp)!: multiple client support for vim.lsp.buf.hover()
Deprecate `vim.lsp.handlers.hover` and `vim.lsp.handlers['textDocument/hover']`
2024-10-29 09:06:05 +00:00
Lewis Russell
1471dfc859 refactor(lsp): buf_request_all 2024-10-29 09:06:05 +00:00
Christian Clason
8f9401f5c8 vim-patch:1e2007e: runtime(awk): Highlight more awk comments in syntax script
closes: vim/vim#15944

1e2007e643

Co-authored-by: John M Devin <john.m.devin@gmail.com>
2024-10-29 08:30:59 +01:00
zeertzjq
4a4b52dca4
vim-patch:9.1.0820: tests: Mac OS tests are too flaky (#30980)
Problem:  tests: Mac OS tests are too flaky
Solution: Increase max test timeout to 25 minutes,
          allow up to 10 retries on Mac OS runners,
          refactor runtest.vim (Milly).

closes: vim/vim#15940

baab7c0865

Co-authored-by: Milly <milly.ca@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
2024-10-29 09:08:05 +08:00
zeertzjq
0e32c48060
Merge pull request #30979 from zeertzjq/vim-9.1.0810
vim-patch:9.1.{0810,0811,0821}: 'findexpr'
2024-10-29 09:01:46 +08:00
zeertzjq
60b3ccd850 vim-patch:9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline argument
Problem:  'findexpr' completion doesn't set v:fname to cmdline argument.
Solution: Set v:fname to the cmdline argument as-is (zeertzjq).

closes: vim/vim#15934

20e045f781
2024-10-29 08:20:00 +08:00
zeertzjq
6b8c3d146e vim-patch:9.1.0811: :find expansion does not consider 'findexpr'
Problem:  :find expansion does not consider 'findexpr'
Solution: Support expanding :find command argument using 'findexpr'
          (Yegappan Lakshmanan)

closes: vim/vim#15929

2f6efaccfd

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-10-29 08:20:00 +08:00
zeertzjq
378d9135e7 vim-patch:9.1.0810: cannot easily adjust the |:find| command
Problem:  cannot easily adjust the |:find| command
Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan)

closes: vim/vim#15901
closes: vim/vim#15905

aeb1c97db5

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-10-29 08:20:00 +08:00
zeertzjq
42fa3d080e
refactor: sort various Lua tables in src/ alphabetically (#30977) 2024-10-29 07:57:25 +08:00
Famiu Haque
34c44c3556
refactor(options): option flags enum #30961
Problem: Currently we use macros with hardcoded flag values for option flags, which is messy and requires a lot of mental math for adding / removing option flags. Using macros for option flags also means that they cannot be used inside debuggers.

Solution: Create a new `OptFlags` enum that stores all the option flags in an organized way that is easier to understand.
2024-10-28 06:49:16 -07:00
Nikita Revenco
0b7cc014fc
feat(defaults): map gO to LSP document_symbol #30781 2024-10-28 06:29:29 -07:00
Maria José Solano
0086ee90dd
fix(lsp): list all workspace folders in healthcheck #30966 2024-10-28 06:14:56 -07:00
zeertzjq
ff29fd8c6e
test(pum): add test for item selection with 'rightleft' (#30968) 2024-10-28 17:20:00 +08:00
zeertzjq
d24fb72c33
fix(pum): don't select item when clicking to the left/right (#30967)
Problem:  Selecting an item in the right-click menu when clicking to the
          left/right of it is confusing, especially in a UI that doesn't
          support 'mousemoveevent'.
Solution: Don't select an item when clicking to the left/right of the
          right-click menu.
2024-10-28 14:29:59 +08:00
Amaan Qureshi
7a20f93a92 fix(treesitter): correct condition in __has_ancestor 2024-10-27 17:56:06 +00:00
Donatas
a9e725b26e
feat(diagnostics)!: sort underline severity_sort (#30898)
feat(diagnostics)!: sort underline with severity_sort

BREAKING CHANGE: underline will be applied with a higher value than `vim.hl.priorities.diagnostics`
2024-10-27 11:36:39 -05:00
Gregory Anders
adf7c98d60
fix(lsp): compare URI instead of workspace folder name (#30962)
The workspace folder name is meant to be a human-readable name which is
only used in the UI. Comparing the name against root_dir is thus not
a valid comparison. Instead, we should compare the workspace folder's
URI against the root dir URI.
2024-10-27 11:35:45 -05:00
echometerain
45e319ade6
feat(tutor): give hints to satisfy the line checker #30952
Problem: novice users relying on vimtutor won't know what to do when they follow the instructions and delete a couple lines and that breaks the line checker

Solution: tell the user to fix the line numbers after they're done
2024-10-27 06:50:17 -07:00
Famiu Haque
b136a9ee4c
refactor(options): always allocate option values (#30917)
Instead of keeping `P_ALLOCED` and `P_DEF_ALLOCED` flags to check if an
option value is allocated, always allocate option values to simplify the
logic.

Ref: #25672
2024-10-27 13:09:24 +00:00
Maria José Solano
123c0b6b4e docs(lsp): document alternative for vim.lsp.util.jump_to_location 2024-10-27 09:26:52 +00:00
Riley Bruins
f60a1f9059 docs(treesitter): specify predicate boolean return value 2024-10-27 09:25:07 +00:00
Tristan Knight
25b53b593e
refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915
* deprecate old signatures
* move to new str_byteindex/str_utfindex signature
* use single-underscore name (double-underscore is reserved for Lua itself)
2024-10-26 07:38:25 -07:00
Famiu Haque
b922b7d6d7
refactor(options)!: use OptVal for option defaults #26691
Problem: We use `void *` for option default values, which is confusing and can cause problems with type-correctness. It also doesn't accomodate for multitype options. On top of that, it also leads to default boolean option values not behaving correctly on big endian systems.

Solution: Use `OptVal` for option default values.

BREAKING CHANGE:
- `:set {option}<` removes the local value for all global-local options instead of just string global-local options.
- `:setlocal {option}<` copies the global value to the local value for number and boolean global-local options instead of removing the local value.
2024-10-25 07:10:40 -07:00
Maria José Solano
01739d4673
fix(defaults): missing ]Q/[Q unimpaired mappings #30943 2024-10-25 06:45:27 -07:00
zeertzjq
e4a74e986c
vim-patch:9.1.0814: mapset() may remove unrelated mapping (#30941)
Problem:  mapset() may remove unrelated mapping whose {rhs} matches the
          restored mapping's {lhs}.
Solution: only match by {lhs} when unmapping for mapset() (zeertzjq).

closes: vim/vim#15935

fdf135a052
2024-10-24 23:16:54 +00:00
Lewis Russell
54249d051c feat(lsp): deprecate vim.lsp.buf.completion
Use `vim.lsp.completion.trigger()` instead'
2024-10-24 16:36:14 +01:00
Lewis Russell
7a7747f1e4 feat(lsp): deprecate execute_command with client:exec_cmd 2024-10-24 15:37:34 +01:00
Lewis Russell
39d79efa1e fix(lsp): better multi-client support for callHierarchy
Only ever display a dialogue box once.

Switch from vim.fn.inpulist to vim.ui.select

refactor(lsp): merge call and type hierarchy functions
2024-10-24 13:15:25 +01:00
Lewis Russell
c8d7d65679 fix(lsp): use correct method for prepareTypehierarchy
Regression from #30902
2024-10-24 13:15:25 +01:00
Mathias Fussenegger
3c51058d76 fix(lsp): set tagstack on jump via goto methods
Follow up to https://github.com/neovim/neovim/pull/30877
Fixes https://github.com/neovim/neovim/issues/30926
2024-10-24 13:43:49 +02:00
Lewis Russell
5c44c02405
Merge pull request #30929 from lewis6991/fix/lsp_param_encodings 2024-10-24 11:19:38 +01:00
Lewis Russell
2dcbfe78fc fix(lsp.buf): use correct offset_encoding for all requests
Problem:

`lsp.buf_request` send the same params to all servers and many
calls to this pass PositionalParams which depends on the clients
offset_encoding. This can result with incorrect params being sent
to a server.

Solution:

`lsp.buf_request` `params` argument can now be passed as a function
which takes the client as the first argument. This is used in
lsp/buf.lua to construct correct params for each client request.
2024-10-24 10:53:06 +01:00
Lewis Russell
3275ae830d fix(lsp.protocal): improve typing of constants 2024-10-24 10:53:03 +01:00
Lewis Russell
2ee39b7eb4 refactor(lsp.buf): remove buf_request wrapper 2024-10-24 09:58:22 +01:00
Lewis Russell
ad4e14c201 refactor(lsp.buf): use alias for vim.lsp 2024-10-24 09:55:23 +01:00
Mathias Fussenegger
008782208d fix(lsp): handle mixed encoding in tagfunc params
Relates to https://github.com/neovim/neovim/issues/30034
2024-10-24 09:56:58 +02:00
zeertzjq
50e63c8171
fix(options): missing error check for global 'scl' and 'winhl' (#30919) 2024-10-24 10:03:38 +08:00
zeertzjq
fffcb88ad6
test(012_directory_spec): fix flakiness on Windows (#30920)
Problem:  012_directory_spec is flaky on Windows.
Solution: Use :%bwipe! instead :qall!.
2024-10-24 10:03:23 +08:00
zeertzjq
611c416359
Merge pull request #30918 from zeertzjq/vim-9.1.0802
vim-patch:9.1.{0802,0803,0804,0806,0812}: :setglobal fixes
2024-10-24 07:22:04 +08:00
zeertzjq
19204ebde9 test(old): remove unnecessary :setglobal skips 2024-10-24 06:56:12 +08:00
zeertzjq
a0ad35e3bb vim-patch:9.1.0812: Coverity warns about dereferencing NULL ptr
Problem:  Coverity warns about dereferencing NULL ptr
          in check_colorcolumn()
Solution: verify that wp is not null before accessing it

related: vim/vim#15914

d0809869d6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-10-24 06:56:12 +08:00
zeertzjq
6b63fe798b vim-patch:9.1.0806: tests: no error check when setting global 'briopt'
Problem:  tests: no error check when setting global 'briopt'
Solution: also parse and check global 'briopt' value (Milly)

closes: vim/vim#15911

b38700ac81

Co-authored-by: Milly <milly.ca@gmail.com>
2024-10-24 06:56:12 +08:00
zeertzjq
5436d9b3c6 vim-patch:9.1.0804: tests: no error check when setting global 'cc'
Problem:  tests: no error check when setting global 'cc'
Solution: also parse and check global 'cc' value (Milly)

closes: vim/vim#15914

a441a3eaab

Co-authored-by: Milly <milly.ca@gmail.com>
2024-10-24 06:56:12 +08:00