Commit Graph

29867 Commits

Author SHA1 Message Date
Christian Clason
6592873f77 feat(help): use treesitter for table of contents
Problem: Creating the table of contents for `gO` is complicated.

Solution: Use treesitter instead.
2024-06-09 13:54:34 +02:00
Christian Clason
105a9e3dcf build(deps): bump tree-sitter-vimdoc to v3.0.0 2024-06-08 10:19:28 +02:00
James
4881211097
refactor: quadratic behavior in vim_findfile_stopdir (#29232)
Copies characters in-places instead. Related #27827
2024-06-08 10:12:39 +08:00
Lennard Hofmann
da6f68ee69
fix(man): filter OSC 8 hyperlink markup #29171
Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;"
Solution: Remove noise so that it shows as "https://cmake.org".
See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
2024-06-07 12:43:17 -07:00
altermo
f3632e14e3
feat: get/set namespace properties #28728
ref https://github.com/neovim/neovim/pull/28432
ref https://github.com/neovim/neovim/issues/28469
2024-06-07 08:33:40 -07:00
Al Colmenar
2ce4a4d91e
fix(lsp): fix reverse sorting of same position text edits (#29212)
Problem:
Text edits with the same position (both line and character) were being
reverse sorted prior to being applied which differs from the lsp spec

Solution:
Change the sort order for just the same position edits
2024-06-07 11:54:43 +02:00
Mathias Fußenegger
6e45cd7f00
fix(lsp): revert buf_versions deprecation/replacement (#29217)
* Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)"

This reverts commit 2e6d295f79.

* Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)"

This reverts commit 5c33815448.
2024-06-07 11:36:46 +02:00
dundargoc
6c7677e5d2
revert(commitlint): stop ignoring "fixup" commits (#29184)
This reverts 2875d45e79.

Allowing lintcommit to ignore "fixup" makes it too easy to fixup commits
to be merged on master as the CI won't give any indications that
something is wrong. Contributors can always squash their pull requests
if it annoys them too much.
2024-06-07 11:36:14 +08:00
dundargoc
8c5af0eb85
docs: misc (#28837)
Co-authored-by: Danymat <d.danymat@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jakub Okoński <jakub@okonski.org>
Co-authored-by: John L. Villalovos <john@sodarock.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: Michaili K <git@michaili.dev>
Co-authored-by: TheLeoP <eugenio2305@hotmail.com>
Co-authored-by: Tobias Schmitz <tobiasschmitz2001@gmail.com>
Co-authored-by: W20MC <157727813+W20MC@users.noreply.github.com>
Co-authored-by: Will Hopkins <willothyh@gmail.com>
Co-authored-by: Yifan Hu <141280278+b0ae989c@users.noreply.github.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: prljav <74116121+prljav@users.noreply.github.com>
2024-06-07 10:55:14 +08:00
Christian Clason
d490a7bc5b vim-patch:ce47d32: runtime(cpp): Change 'cms' for C++ to '// %s'
fixes: vim/vim#14911
closes: vim/vim#14926

ce47d32b03

Co-authored-by: Luc Hermitte <luc.hermitte@csgroup.eu>
2024-06-07 00:17:56 +02:00
sus-domesticus
cb6c0fda71
feat(editorconfig): add support for spelling_language (#28638) 2024-06-06 09:16:43 -05:00
bfredl
972374f4e9
Merge pull request #29221 from bfredl/filebuffix
fix(fileio): copy to correct buffer position when reading
2024-06-06 15:11:04 +02:00
bfredl
84ad95fdc9 fix(fileio): copy to correct buffer position when reading
fixes #29186 (likely)

fixup for #29093 064483a2b
2024-06-06 13:48:05 +02:00
zeertzjq
78d3f47428
vim-patch:92f4e91: runtime(vim): Update base-syntax, allow whitespace before :substitute pattern (#29210)
Allow whitespace between the :substitute command and its pattern
argument.  Although unusual, it is supported and there are examples in
the wild.

Match Vi compatible :substitute commands like :s\/{string}/.  See :help
E1270.

fixes: vim/vim#14920
closes: vim/vim#14923

92f4e91590

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-06-06 06:40:11 +08:00
zeertzjq
12b43919a1
Merge pull request #29209 from zeertzjq/vim-9.1.0467
vim-patch:9.1.{0467,0469}
2024-06-06 06:27:39 +08:00
zeertzjq
1d4e894403 vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem:  Cannot have buffer-local value for 'completeopt'
          (Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).

Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.

fixes: vim/vim#5487
closes: vim/vim#14922

529b9ad62a
2024-06-06 06:07:31 +08:00
zeertzjq
c235a063d6 vim-patch:9.1.0467: typos in some comments
Problem:  typos in some comments
          (after v9.1.0466)
Solution: fix comments
          (zeertzjq)

closes: vim/vim#14919

551d8c372e
2024-06-06 05:50:12 +08:00
Gregory Anders
d7651b27d5
fix(tui): move $COLORTERM check to _defaults.lua (#29197)
We currently check $COLORTERM in the TUI process to determine if the
terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor"
or "24bit" then we automatically assume that the terminal supports
truecolor, but if $COLORTERM is set to any other value we still query
the terminal.

The `rgb` flag of the UI struct is a boolean which only indicates
whether the UI supports truecolor, but does not have a 3rd state that we
can use to represent "we don't know if the UI supports truecolor". We
currently use `rgb=false` to represent this "we don't know" state, and
we use XTGETTCAP and DECRQSS queries to determine at runtime if the
terminal supports truecolor. However, if $COLORTERM is set to a value
besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear
indication that the terminal _does not_ support truecolor, so it is
incorrect to treat `rgb=false` as "we don't know" in that case.

Instead, in the TUI process we only check for the terminfo capabilities.
This must be done in the TUI process because we do not have access to
this information in the core Neovim process when `_defaults.lua` runs.
If the TUI cannot determine truecolor support from terminfo alone, we
set `rgb=false` to indicate "we don't know if the terminal supports
truecolor yet, keep checking". When we get to `_defaults.lua`, we can
then check $COLORTERM and only query the terminal if it is unset.

This means that users can explicitly opt out of truecolor determination
by setting `COLORTERM=256` (or similar) in their environment.
2024-06-05 08:27:56 -05:00
zeertzjq
43bd9c9c1c
fix(lua): don't clamp -1 or v:maxcol in vim.highlight.range() (#29203) 2024-06-05 16:47:43 +08:00
zeertzjq
e41597c510
Merge pull request #29200 from zeertzjq/vim-9.1.0463
vim-patch:9.1.{0463,0466}
2024-06-05 15:26:24 +08:00
zeertzjq
818cb27e48 vim-patch:9.1.0466: Missing comments for fuzzy completion
Problem:  Missing comments for fuzzy completion (after 9.1.0463)
Solution: Add more comments, adjust indentation slightly
          (glepnir)

closes: vim/vim#14910

dca57fb542

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-05 15:08:31 +08:00
zeertzjq
c2e836c41c vim-patch:2a2c4ff: runtime(doc): clarify how fuzzy 'completeopt' should work
related: vim/vim#14912

2a2c4fffd7

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-05 15:08:31 +08:00
zeertzjq
164338330b vim-patch:9.1.0463: no fuzzy-matching support for insert-completion
Problem:  no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
          using :set completopt+=fuzzy (glepnir).

closes: vim/vim#14878

a218cc6cda

Co-authored-by: glepnir <glephunter@gmail.com>
2024-06-05 15:08:31 +08:00
Andre Toerien
f69937fdbd
fix(diagnostic): fix float scope filtering (#29134) 2024-06-04 16:35:44 -05:00
Christian Clason
946a839aa9 vim-patch:98b73eb: runtime(netrw): prevent accidental data loss
fixes: vim/vim#14915

98b73eb645

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-04 23:15:50 +02:00
Saltaformajo
230bc34ca5
fix(lsp): check if buffer is valid before LspDetach autocmd (#29162) 2024-06-04 17:23:57 +02:00
jdrouhard
43581011e4
fix(lsp): remove superfluous on_detach callback from semantic tokens module (#29174)
LspDetach is now triggered by the main on_detach callback that is added
when an LSP client is attached to a buffer. The semantic_tokens module
already includes a LspDetach handler that does the right thing. When the
LspDetach trigger was added to the main LSP on_detach, it created a race
condition in semantic tokens when a buffer was deleted that would
trigger both its own on_detach and the LspDetach handlers. If the former
came last, an error was thrown trying to delete a non-existent augroup
(destroy() was being called twice).
2024-06-04 17:22:02 +02:00
Mathias Fußenegger
2e6d295f79
fix(lsp): account for changedtick version gap on modified reset (#29170)
Follow up to https://github.com/neovim/neovim/pull/28943
Fixes https://github.com/neovim/neovim/issues/29163
2024-06-04 17:21:37 +02:00
luukvbaal
b66106a46c
fix(ui): superfluous showmode / excessive grid_cursor_goto #29089
Problem:  Unsetting global variables earlier in #28578 to avoid
          recursiveness, caused superfluous or even unlimited
          showmode().
Solution: Partly revert #28578 so that the globals are unset at the end
          of showmode(), and avoid recursiveness for ext UI by adding a
          recursive function guard to each generated UI call that may
          call a Lua callback.
2024-06-04 06:09:12 -07:00
Ilia Choly
8cbb1f20e5
refactor(lua): use tuple syntax everywhere #29111 2024-06-04 06:06:02 -07:00
Luis Calle
61025c9e7a
feat(install): mention standard paths, XDG vars in Windows installer #29101
fix #25207

The `.wxs` files were copied from
- cmake repo (BSD 3-Clause License)
  https://github.com/Kitware/CMake/blob/master/Utilities/Release/WiX/install_dir.wxs
- wix repo [Microsoft Reciprocal License](b40e9a32c2/LICENSE.TXT))
  b40e9a32c2/src/ext/UIExtension/wixlib/WixUI_InstallDir.wxs
2024-06-04 05:51:35 -07:00
Christian Clason
8369590eb2 fix(runtime): remove obsolete ftplugin/calender.lua 2024-06-04 12:54:34 +02:00
Lewis Russell
ae0d562644 refactor(spell.c): reduce scope of locals 2024-06-04 11:07:01 +01:00
Evgeni Chasnovski
aa9f21ee95 fix(filetype): fix typos in filetype detection 2024-06-04 11:26:27 +02:00
James Tirta Halim
46b69aaf14 fixup: include nvim/ascii_defs.h 2024-06-04 09:42:19 +01:00
James Tirta Halim
200e7ad157 fixup: apply the change on more files 2024-06-04 09:42:19 +01:00
James Tirta Halim
4b3845be2e fixup: LNUL 2024-06-04 09:42:19 +01:00
James Tirta Halim
a18982cb83 refactor: replace '\0' with NUL 2024-06-04 09:42:19 +01:00
Christian Clason
2f5b8a0092 vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins
Problem:  no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
          existing filetype plugins with the new default value
          (Riley Bruins)

closes: vim/vim#14843

0a0830624a

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
2024-06-04 10:38:55 +02:00
zeertzjq
e20c5fba2c
vim-patch:partial:8.2.3637: typos in test files (#29172)
Problem:    Typos in test files.
Solution:   Correct the typos. (Dominique Pellé, closes vim/vim#9175)

923dce2b07

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2024-06-04 06:07:20 +08:00
ippachi
5aa9906676
fix(lsp): use client.id instead of pairs index (#29143)
Problem: Completion side effects not working randomly.

Solution: When creating the table of LSP responses, the table index
was used, but this is not the same as the actual client_id, so it was changed
to use the client_id directly.
2024-06-03 18:07:09 +02:00
dundargoc
a9c89bcbf6 fix(gx): allow @ in url
This will make `gx` work for links for the form
https://hachyderm.io/@neovim.
2024-06-03 15:33:10 +02:00
Soham Shanbhag
054a287dbe
feat(ftplugin): change 'commentstring' to // %s for C/C++ (#29085)
Problem: The default commentstring for C/C++ can lead to invalid code 
when commenting and does not match the Nvim codebase.

Solution: Change commentstring to `// %s` as used by Neovim. Also
set all commentstrings that derive from the default C string explicitly
(and correctly).
2024-06-03 09:48:43 +02:00
zeertzjq
3a1515bfee
vim-patch:partial:9.1.0461: too many strlen() calls in drawline.c (#29150)
Problem:  too many strlen() calls in drawline.c
Solution: Refactor code to avoid strlen()
          (John Marriott)

closes: vim/vim#14890

f51ff96532

Co-authored-by: John Marriott <basilisk@internode.on.net>
2024-06-03 05:38:06 +08:00
zeertzjq
0c9f7f5f96
vim-patch:9.1.0458: Coverity complains about division by zero (#29149)
Problem:  Coverity complains about division by zero
Solution: Check explicitly for sw_val being zero

Shouldn't happen, since tabstop value should always be larger than zero.
So just add this as a safety measure.

7737ce519b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-03 05:35:02 +08:00
Christian Clason
659d3dcd2e vim-patch:9.1.0460: filetype: lintstagedrc files are not recognized
Problem:  filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
          (İlyas Akın)

see: https://github.com/lint-staged/lint-staged

closes: vim/vim#14897

7577afd5ef

Co-authored-by: İlyas Akın <ilyas.akin@kuika.com>
2024-06-02 23:01:20 +02:00
bfredl
89dc8f8f4e
Merge pull request #29124 from bfredl/inputring
refactor(input): don't use a ring for input
2024-06-02 10:19:55 +02:00
Mathias Fußenegger
19be3d2683
fix(lsp): trim trailing whitespace from completion words (#29122)
the `complete()` mechanism doesn't play nicely with trailing newlines or
tabs. A newline causes it to insert a null character, showing up as
`^@`.
2024-06-02 09:54:15 +02:00
zeertzjq
24cb9ba6d3
Merge pull request #29136 from zeertzjq/vim-8.2.0083
vim-patch:8.2.{0083,0109}
2024-06-02 15:37:11 +08:00
zeertzjq
56337310ef test: add a test for #29119 2024-06-02 15:18:30 +08:00