Commit Graph

29687 Commits

Author SHA1 Message Date
github-actions[bot]
dfff482efe
fix(lsp): remove superfluous on_detach callback from semantic tokens module (#29188)
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).

(cherry picked from commit 43581011e4)

Co-authored-by: jdrouhard <john@drouhard.dev>
2024-06-04 19:00:51 +02:00
zeertzjq
8dece36427
Merge pull request #29187 from neovim/backport-29089-to-release-0.10
fix(ui): superfluous showmode due to unset globals
2024-06-04 21:48:57 +08:00
luukvbaal
7055cd1238 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.
(cherry picked from commit b66106a46c)
2024-06-04 13:10:45 +00:00
zeertzjq
f1fba12803
Merge pull request #29182 from neovim/backport-29181-to-release-0.10
fix(filetype): fix typos in filetype detection
2024-06-04 17:39:29 +08:00
Evgeni Chasnovski
1fe1f8556e fix(filetype): fix typos in filetype detection
(cherry picked from commit aa9f21ee95)
2024-06-04 09:26:54 +00:00
zeertzjq
94d8f6bde8
Merge pull request #29139 from neovim/backport-29136-to-release-0.10
vim-patch:8.2.{0083,0109}
2024-06-02 15:50:32 +08:00
zeertzjq
f03348472d test: add a test for #29119
(cherry picked from commit 56337310ef)
2024-06-02 07:37:27 +00:00
zeertzjq
571e54e12c vim-patch:8.2.0109: corrupted text properties when expanding spaces
Problem:    Corrupted text properties when expanding spaces.
Solution:   Reallocate the line. (Nobuhiro Takasaki, closes vim/vim#5457)

ac15fd8c67

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 97d9d71bf3)
2024-06-02 07:37:27 +00:00
zeertzjq
704d33634e vim-patch:8.2.0083: text properties wrong when tabs and spaces are exchanged
Problem:    Text properties wrong when tabs and spaces are exchanged.
Solution:   Take text properties into account. (Nobuhiro Takasaki,
            closes vim/vim#5427)

5cb0b93d52

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 4374ec83cd)
2024-06-02 07:37:27 +00:00
zeertzjq
4c53b9c0a1
Merge pull request #29125 from neovim/backport-29003-to-release-0.10
fix(column): crash with 'signcolumn' set to "number"
2024-06-01 18:29:23 +08:00
luukvbaal
df6ce8377f fix(column): crash with 'signcolumn' set to "number" (#29003)
Problem:  Numberwidth may depend on number of signs with text in the
          buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
          handled properly for legacy and extmark signs alike.
(cherry picked from commit f2083bd55c)
2024-06-01 10:10:52 +00:00
zeertzjq
58e1ef2f65
Merge pull request #29105 from neovim/backport-29099-to-release-0.10
fix(win-msi): add bin to PATH per-machine after installation
2024-05-31 13:39:38 +08:00
Luis Calle
c3aef56199 fix(win-msi): add bin to PATH per-machine after installation (#29099)
#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see #22933 and
https://stackoverflow.com/a/15498911). It was then reverted in #22949,
but the scope of the modification to the PATH environment variable was
not reverted.

(cherry picked from commit a18652ed61)
2024-05-31 04:45:46 +00:00
github-actions[bot]
d8ff216040
fix(lsp): clear lsp client diagnostics (#29091)
Problem: When an lsp client is stopped, the client will
only clear the diagnostics for the attached buffers but
not the unattached buffers.
Solution: Reset the diagnostics for the whole namespace rather than
for only the attached buffers.

(cherry picked from commit 025c874415)

Co-authored-by: crwebb85 <51029315+crwebb85@users.noreply.github.com>
2024-05-30 09:23:04 +02:00
github-actions[bot]
89fa1ee822
fix(ui): flush ext_cmdline events before doing cmdpreview (#29062)
Problem:  Unable to update the screen for external cmdline during cmdpreview.
Solution: Flush the cmdline UI before cmdpreview state.
(cherry picked from commit 5b6477be45)

Co-authored-by: luukvbaal <luukvbaal@gmail.com>
2024-05-28 03:06:20 -07:00
zeertzjq
88cd7a6cdd
Merge pull request #29058 from neovim/backport-29057-to-release-0.10
vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
2024-05-28 15:15:24 +08:00
zeertzjq
fdf769fa86 vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
This seems to be a forgotten fixup in 2d919d2744 (r141568461)

0b74eeceb8
(cherry picked from commit 4e2c8dc374)
2024-05-28 07:00:03 +00:00
zeertzjq
b36458b363
Merge pull request #29054 from neovim/backport-29053-to-release-0.10
fix(runtime): source c ftplugin properly for cpp on Windows
2024-05-28 06:51:36 +08:00
zeertzjq
b98aa783f3 fix(runtime): source c ftplugin properly for cpp on Windows (#29053)
On Windows, '{' is currently not treated as a wildcard char, so another
wildcard char is needed for the pattern to be treated as a wildcard.

It may be worth trying to make '{' always a wildcard char in the future,
but that'll be a bit harder as it'll be necessary to make sure '{' is
escaped at various places.

(cherry picked from commit 7b16c1fa84)
2024-05-27 22:39:22 +00:00
github-actions[bot]
039121f5a3
fix(snippet): cancel snippet session when leaving the buffer (#29044)
(cherry picked from commit 608543f8a9)

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2024-05-27 17:56:05 +02:00
github-actions[bot]
e98637e8c0
fix(lsp): do not detach from buffer if there are uninitialized clients (#29043)
Problem: if on_lines is called before the LSP is initialized, the buffer
is detached.
Solution: check for uninitialized clients before detaching.

(cherry picked from commit 292365fa1b)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-05-27 17:26:42 +02:00
zeertzjq
b9e540cc70
Merge pull request #29038 from neovim/backport-28983-to-release-0.10
fix: "popcount" name conflict on NetBSD
2024-05-27 19:28:31 +08:00
Malte Dehling
b322c3560b build: "popcount" name conflict on NetBSD #28983
Problem:
    NetBSD's libc already has a function by the same name.

Solution:
    Rename popcount to xpopcount and add #if defined(__NetBSD__) to
prefer NetBSD's own implementation.  This fixes #28983.

(cherry picked from commit 104800ce2e)
2024-05-27 11:15:13 +00:00
zeertzjq
8d1467ce9a
Merge pull request #29036 from neovim/backport-29035-to-release-0.10
fix(drawline): don't draw beyond end of window
2024-05-27 14:51:14 +08:00
zeertzjq
5d9f2d7ecc fix(drawline): don't draw beyond end of window (#29035)
(cherry picked from commit 9a0239fdc8)
2024-05-27 06:37:38 +00:00
zeertzjq
565fccbeeb
Merge pull request #29027 from neovim/backport-28961-to-release-0.10
fix(extmarks): issues with revalidating marks
2024-05-27 05:36:25 +08:00
Mathias Fußenegger
3a354bfcaa
refactor(lsp): reuse buf_detach_client logic in on_detach (#28939) (#29024)
(cherry picked from commit 2908f71dc9)
2024-05-26 20:47:59 +02:00
luukvbaal
bec397edda fix(extmarks): issues with revalidating marks #28961
Problem:  Invalid marks appear to be revalidated multiple times, and
          decor is added at the old position for unpaired marks.
Solution: Avoid revalidating already valid marks, and don't use old
          position to add to decor for unpaired marks.
(cherry picked from commit 43a2019f09)
2024-05-26 17:56:50 +00:00
github-actions[bot]
4efca7cda5
fix(lsp): handle nil root_dir in health check (#29010)
fix(lsp): handle nil root_dir in health check (#29007)

The root directory could show up as something like:

    Root directory: ~/path/to/cwd/v:null

Despite being `nil`

(cherry picked from commit f03b1622ad)

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2024-05-25 17:30:27 -05:00
github-actions[bot]
84d7bfcf16
fix(snippet): don't override unnamed register on tabstop select (#29008)
(cherry picked from commit 7994fdba6a)

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2024-05-25 22:05:23 +02:00
github-actions[bot]
777e15fa61
docs: update LSP quickstart (#28989)
docs: update LSP quickstart (#28954)

The LSP quickstart can act as our true "entrypoint" for answering the
question "How do I use LSP in Neovim?" As such, it can be a little more
beginniner-friendly than other sections of our help docs by including
explanatory comments and a more fleshed out example (including a
`FileType` autocommand).

This also includes some other minor wording updates and points users
toward `:checkhealth lsp`.

(cherry picked from commit 28c04948a1)

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2024-05-24 18:47:36 -05:00
github-actions[bot]
ebc6c38cde
feat(lsp): update LSP healthcheck format (#28988)
feat(lsp): update LSP healthcheck format (#28980)

This is mostly an aesthetic change, although there are a few new pieces
of information included. Originally I wanted to investigate including
server capabilities in the healthcheck, but until we have the ability to
fold/unfold text in health checks that would be too much information.

(cherry picked from commit 5d26934c7c)

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2024-05-24 18:47:13 -05:00
github-actions[bot]
bf16fe3f01
fix(fs): make vim.fs.root work for relative paths and unnamed buffers (#28973)
If a buffer does not have a backing file then fall back to the current
working directory.

(cherry picked from commit 206f8f24a2)
2024-05-24 10:57:21 -05:00
github-actions[bot]
28f03205be
fix: show swapfile warning as a warning (#28972)
The new default SwapExists autocommand displays warning text (W325) but
does not use the WarningMsg highlight group as other warnings do. Use
the WARN log level when displaying this warning.

(cherry picked from commit e71713ba2b)
2024-05-24 10:48:07 -05:00
zeertzjq
7e878da7dd
Merge pull request #28953 from neovim/backport-28810-to-release-0.10
fix(colorscheme): update `StatusLineNC` to have underline with 'notgc'
2024-05-24 05:42:46 +08:00
github-actions[bot]
21b21b94e6
fix(comment): fall back to using trimmed comment markers (#28950)
fix(comment): fall back to using trimmed comment markers (#28938)

Problem: Currently comment detection, addition, and removal are done
  by matching 'commentstring' exactly. This has the downside when users
  want to add comment markers with space (like with `-- %s`
  commentstring) but also be able to uncomment lines that do not contain
  space (like `--aaa`).

Solution: Use the following approach:
  - Line is commented if it matches 'commentstring' with trimmed parts.
  - Adding comment is 100% relying on 'commentstring' parts (as is now).
  - Removing comment is first trying exact 'commentstring' parts with
    fallback on trying its trimmed parts.
(cherry picked from commit 0a2218f965)

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2024-05-23 16:02:13 -05:00
Evgeni Chasnovski
e1b6187801 fix(colorscheme): underline StatusLineNC with 'notermguicolors' #28810
Problem: statusline for non-active window can be hard to distinguish
  from normal text with 'notermguicolors'. It was set to use only bold
  text to find a balance between being not too similar to active
  statusline and normal text, and be supported in enough terminal
  emulators (if it does not support 'termguicolors' there is higher
  chance that it also does not support underline).

Solution: reconsider balance by placing more emphasis on making
  non-active statusline more distinguishable.
  This also results into tabline being shown with underline which
  aligns with "make more distinguishable" shift.
(cherry picked from commit 9b9f54e2c1)
2024-05-23 21:01:15 +00:00
github-actions[bot]
bdd5871dc5
fix(lsp): check if buffer was detached in on_init callback (#28942)
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
(cherry picked from commit af200c10cf)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-05-23 16:27:27 +02:00
github-actions[bot]
10a16c1311
fix(lsp): trigger LspDetach on buffer delete
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
(cherry picked from commit 5ac8db10f0)

Co-authored-by: Andre Toerien <49614525+AThePeanut4@users.noreply.github.com>
2024-05-23 13:30:39 +02:00
github-actions[bot]
3a727beafd
fix(lsp): detach all clients on_reload to force buf_state reload (#28898)
Problem:  The changetracking state can de-sync when reloading a buffer
          with more than one LSP client attached.
Solution: Fully detach all clients from the buffer to force buf_state to
          be re-created.
(cherry picked from commit 879d17ea8d)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-05-21 20:18:48 +02:00
github-actions[bot]
efe8a0a520
fix(lsp): hide layout in codelenses in virtual text (#28794) (#28895)
Problem: layout i.e. whitespace that is part of codelenses is currently
displayed as weird symbols and large amounts of spaces

Solution: replace all consecutive whitespace symbols with a single space
character when trying to display codelenses as virtual text

(cherry picked from commit d9a2acdab3)

Co-authored-by: Mango The Fourth <40720523+MangoIV@users.noreply.github.com>
2024-05-21 18:41:55 +02:00
Ilia Choly
4f0c4c3921 fix(lsp): add textDocument/documentLink to capability map (#28838)
(cherry picked from commit 8263ed4670)
2024-05-21 18:41:22 +02:00
zeertzjq
4e9864147a
Merge pull request #28891 from neovim/backport-28884-to-release-0.10
fix(tui): remove duplicate disabling of synchronized output
2024-05-21 21:09:05 +08:00
zeertzjq
89f29fcc92 fix(tui): remove duplicate disabling of synchronized output (#28884)
Synchronized output is enabled and disabled inside flush_buf().

(cherry picked from commit 47c741e30c)
2024-05-21 12:54:38 +00:00
zeertzjq
671073e714
Merge pull request #28842 from neovim/backport-28829-to-release-0.10
refactor(path.c): add nonnull attributes
2024-05-19 05:59:54 +08:00
zeertzjq
dffadc392e refactor(path.c): add nonnull attributes (#28829)
This possibly fixes the coverity warning.

(cherry picked from commit 63e3a63d2f)
2024-05-18 21:38:49 +00:00
zeertzjq
1e62f8e15c
Merge pull request #28833 from neovim/backport-28831-to-release-0.10
vim-patch:94043780196c
2024-05-18 16:17:11 +08:00
zeertzjq
8e239ed9ea vim-patch:94043780196c (#28831)
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797)

fixes: neovim/neovim#28828

9404378019
(cherry picked from commit 48c2ad5d2d)
2024-05-18 07:53:42 +00:00
zeertzjq
6a1c0e9574
Merge pull request #28823 from neovim/backport-28821-to-release-0.10
fix(move): half-page scrolling with resized grid at eob
2024-05-18 07:13:47 +08:00
zeertzjq
d6756fc0a5 fix(move): half-page scrolling with resized grid at eob (#28821)
(cherry picked from commit 5947f249f8)
2024-05-17 23:00:44 +00:00