Commit Graph

31095 Commits

Author SHA1 Message Date
zeertzjq
1643c49514
vim-patch:9.1.0860: tests: mouse_shape tests use hard code sleep value (#31184)
Problem:  tests: mouse_shape tests use hard code sleep value
          (Bram Moolenaar)
Solution: Use WaitForAssert() instead (Yee Cheng Chin)

related: vim/vim#12157
closes: vim/vim#16042

24078e39cd

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2024-11-13 07:28:40 +08:00
hykerr
86b737649b fix(treesitter): add 'QuitPre' event to autocommands in inspect_tree
Problem: Quitting source buffer for ```:InspectTree``` command raises
```E855``` when source buffer and tree views are the only open buffers.

Solution: Add ```QuitPre``` event to autocmd handling closing/hiding the
source buffer to close all open tree views. This allows nvim to quit
when source and tree buffers are the only open windows.
2024-11-12 16:10:43 +00:00
Nicolas Hillegeer
9aab98a275 refactor(lsp): avoid redundant function wrapping
Leftover from #21026.
2024-11-12 16:10:16 +00:00
Christian Clason
295f98c8e0 vim-patch:9.1.0853: filetype: kubernetes config file not recognized
Problem:  filetype: kubernetes config file not recognized
Solution: detect '/.kube/config' file as yaml filetype
          (Jonathan Lopez)

closes: vim/vim#11076

6fbf63de86

Co-authored-by: Jonathan Lopez <jonathanglopez@gmail.com>
2024-11-12 08:18:38 +01:00
Christian Clason
c026a114b5 vim-patch:129a844: runtime(tar): Update tar.vim to support permissions
These changes enable tar.vim to keep permissions of files that were
edited intact instead of replacing them with the default permissions.

The major change for this is switching from "tar -OPxf", which reads out
the contents of the selected file from an tar archive to stdout to
"tar -pPxf" which extracts the selected file to the current directory
with permissions intact

This requirs the temporary directory to be created earlier.

closes: vim/vim#7379

129a8446d2

Co-authored-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
2024-11-12 08:18:22 +01:00
bfredl
72a1df6065
Merge pull request #31137 from bfredl/hlagain
refactor(tests): use more global highlight definitions
2024-11-11 20:08:26 +01:00
bfredl
c8c237ba2c
Merge pull request #31167 from luukvbaal/msgid
fix(messages): pass previous highlight id to ext chunks
2024-11-11 20:04:07 +01:00
Lewis Russell
3e855d533f
perf(lsp): use faster version of str_byteindex 2024-11-11 14:23:38 +00:00
Luuk van Baal
9fa3a0964e fix(messages): pass previous highlight id to ext chunks 2024-11-11 15:15:33 +01:00
Lewis Russell
ff575b3886 perf(filetype): optimize internal data structures
This changes the type for the sorted pattern table from
`vim.filetype.mapping[]` to `vim.filetype.mapping.sorted[]`

E.g. instead of:

```lua
{
  { ['/debian/changelog$'] = {'debchangelog', { parent = '/debian/' } },
  { ['%.git/']             = { detect.git   , { parent = 'git/', priority = -1 } },
}
```

It is now:

```lua
{
  { '/debian/, '/debian/changelog$', 'debchangelog' },
  { 'git/'   , '%.git/'            , detect.git    , -1 },
}
```

Overall this should roughly cut the amount of tables used by 3, and
replaces lots of hash indexes with array indexes.
2024-11-11 13:42:24 +00:00
bfredl
29fd5ed606 refactor(tests): use more global highlight definitions 2024-11-11 14:27:25 +01:00
bfredl
d0e78b5871
Merge pull request #27813 from luukvbaal/msgid
feat(ext_messages): add hl_id to ext_messages chunks
2024-11-11 12:26:35 +01:00
Christian Clason
7919aa9102 vim-patch:622f6f5: runtime(tex): extra Number highlighting causes issues
So let's revert "runtime(tex): add Number highlighting to syntax file"

This (partly) reverts commits 8e6b5034f32049fd0 and 6065755a39d838aab

fixes: vim/vim#16030

622f6f5b9a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-11 09:24:57 +01:00
zeertzjq
7906532e08
vim-patch:5b63b23: runtime(netrw): directory symlink not resolved in tree view (#31161)
closes: vim/vim#16020

5b63b236a0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-11 07:52:11 +00:00
Christian Clason
f37d290775 vim-patch:6065755: runtime(tex): update Last Change header in syntax script
related: vim/vim#11271

6065755a39

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-11 08:23:46 +01:00
zeertzjq
adbffff5d0
vim-patch:9.1.0849: there are a few typos in the source (#31159)
Problem:  there are a few typos in the source.
Solution: Correct typos (zeertzjq).

closes: vim/vim#16026

7c5152826f
2024-11-11 08:20:41 +08:00
zeertzjq
0e54931b99
vim-patch:060107c: runtime(doc): fix typo in g:termdebug_config (#31155)
closes: vim/vim#16023

060107cbc4
2024-11-10 21:47:24 +08:00
Christian Clason
f59aeb5a9a build(deps): bump tree-sitter to v0.24.4 2024-11-10 11:34:23 +01:00
Christian Clason
07b72d9036 vim-patch:8e6b503: runtime(tex): add Number highlighting to syntax file
closes: vim/vim#11271

8e6b5034f3

Co-authored-by: amarakon <amar.al-zubaidi45@tutanota.com>
2024-11-10 11:05:26 +01:00
Christian Clason
5ff9a9397e vim-patch:a14c457: runtime(dune): use :setl instead of :set in ftplugin
closes: vim/vim#11419

a14c457cad

Co-authored-by: Dani Dickstein <daniel.dickstein@gmail.com>
2024-11-10 11:05:26 +01:00
Riley Bruins
c5f217db01 refactor(lsp): simplify reference range logic 2024-11-10 09:40:37 +00:00
zeertzjq
0eae0bc804
Merge pull request #31150 from zeertzjq/vim-bbe5252
vim-patch: Vim syntax updates
2024-11-10 10:35:57 +08:00
zeertzjq
d090a02780 vim-patch:bbe5252: runtime(vim): Update base-syntax, improve :normal highlighting
Fix command name termination, match bang, and allow a line-continued
argument.

closes: vim/vim#15358

bbe5252c2c

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-11-10 10:03:41 +08:00
zeertzjq
93dbf1d86c vim-patch:818c641: runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations.
- Highlight constructor names with the Function highlight group, like
  other special methods.
- Mark function definitions using special method names as errors.
- Highlight :type arguments.

fixes: vim/vim#14393#issuecomment-2042796198.
closes: vim/vim#13810

818c641b6f

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-11-10 10:03:20 +08:00
zeertzjq
e9dc9be469 vim-patch:80aabaa: runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions (vim/vim#14348)
Currently, the overriding object method definitions are
matched as vimFunctionError (:help builtin-object-methods,
v9.1.0148).

For example:
------------------------------------------------------------
vim9script

class Test
	def string(): string
		return "Test"
	enddef
endclass

echo string(Test.new()) == Test.new().string()
------------------------------------------------------------

Instead, let's introduce a new syntax group vimMethodName
and make these methods its members.  In order to emphasise
the link between the overriding methods and the overridden
functions for highlighting, vimMethodName is linked by
default to vimFuncName.

80aabaab66

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-11-10 10:03:20 +08:00
zeertzjq
f25ffc43a7 vim-patch:dfcef89: runtime(vim): Distinguish Vim9 constructor definitions from the :new ex command (vim/vim#14050)
With the arrival of Vim9 classes, the syntax must allow for
_new_ constructors; multiple constructor definitions are
supported for a class, provided distinct suffix-names are
used.  Currently, the defined constructors match either
vimCommand or vimFunctionError (for any newBar).

For example:
------------------------------------------------------------
vim9script

class Foo
    def new()
    enddef

    def newBar()
    enddef
endclass
------------------------------------------------------------

Since every constructor is required to bear a lower-cased
_new_ prefix name, it should suffice to distinguish them
from functions, and so there are no new highlight or syntax
groups introduced.

dfcef890cb

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-11-10 10:03:20 +08:00
zeertzjq
3da8f4c7ee
vim-patch:5e7f43b: runtime(termdebug): allow to use decimal signs (#31149)
closes: vim/vim#16011

5e7f43b6ac

Co-authored-by: Ella Moss <ella.moss@utah.edu>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-10 09:24:27 +08:00
zeertzjq
7232b54aee
vim-patch:partial:624bb83: runtime(doc): Tweak documentation style a bit (#31148)
closes: vim/vim#11419

624bb83619

Skip syncolor.vim and v:colornames

Co-authored-by: h-east <h.east.727@gmail.com>
2024-11-10 09:11:06 +08:00
dundargoc
7d8dd8234a ci: downgrade to clang 19
Clang 20 is still in development at the time of this commit and is
unsuitable for CI.
2024-11-09 15:42:52 +01:00
Luuk van Baal
4f9260d06a feat(ext_messages): add hl_id to ext_messages chunks
Problem:  Ext_messages chunks only contain the highlight attr id, which
          is not very useful for vim.ui_attach() consumers.
Solotion: Add highlight group id to message chunks, which can easily be
          used to highlight text in the TUI through nvim_buf_set_extmark():
          hl_group = synIDattr(id, "name").
2024-11-09 14:28:17 +01:00
bfredl
dd4c828c86
Merge pull request #31118 from bfredl/merehl
refactor(tests): continue the global highlight definition work
2024-11-09 13:48:45 +01:00
dundargoc
07b14c8e2e build: specify POST_BUILD when using add_custom_command
This is needed specifically for the second signature of
add_custom_command, which appends an operation to an existing target.
This will prevent the cmake warning CMP0175.

Reference: https://cmake.org/cmake/help/latest/policy/CMP0175.html
2024-11-09 13:07:16 +01:00
Lewis Russell
4b001f297a fix(lsp): fix infinite loop
Fixes #31129
2024-11-09 09:41:12 +00:00
zeertzjq
b7e1bbfb50
Merge pull request #31130 from zeertzjq/vim-3780c11
vim-patch: runtime file updates
2024-11-09 09:31:52 +08:00
zeertzjq
c914ecf4c9 vim-patch:0f60fbf: runtime(compiler): improve cppcheck
Properly escape the values for makeprg according to the :set rules

closes: vim/vim#16014

0f60fbf679

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-11-09 08:45:10 +08:00
zeertzjq
591884c9fb vim-patch:39f52a6: runtime(structurizr): Update structurizr syntax
closes: vim/vim#16003

39f52a6249

Co-authored-by: Duke <emersonalmeidax@gmail.com>
2024-11-09 08:44:44 +08:00
zeertzjq
6b6a3b3894 vim-patch:6e410c9: runtime(8th): updated 8th syntax
closes: vim/vim#16005

6e410c9112

Co-authored-by: Ron Aaron <ron@aaron-tech.com>
2024-11-09 08:44:20 +08:00
zeertzjq
b4c5e743ac vim-patch:6d9a145: runtime(compiler): add mypy and ruff compiler; update pylint linter
mypy and ruff come from
https://github.com/Konfekt/vim-compilers/tree/master/compiler and the
former was added by @pbnj-dragon

closes: vim/vim#16007

6d9a145d71

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-11-09 08:43:50 +08:00
zeertzjq
5c600370e0 vim-patch:64a536d: runtime(netrw): fix several bugs in netrw tree listing
fixes: vim/vim#5630
fixes: vim/vim#9807
fixes: vim/vim#14623
closes: vim/vim#15996

64a536d4fa

Co-authored-by: Tom Benham <tom.benham13@gmail.com>
2024-11-09 08:41:04 +08:00
zeertzjq
1d9eb84558 vim-patch:a063b22: runtime(netrw): prevent polluting the search history
a063b22b3b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-11-09 08:24:19 +08:00
zeertzjq
32566dc1c3 vim-patch:3780c11: runtime(compiler): fix typo in cppcheck compiler plugin
closes: vim/vim#16002

3780c11267

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
2024-11-09 08:23:59 +08:00
dundargoc
5a27d02584
docs: misc (#30914)
Co-authored-by: Ernie Rael <errael@raelity.com>
Co-authored-by: Famiu Haque <famiuhaque@proton.me>
Co-authored-by: Jade <spacey-sooty@proton.me>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-11-09 08:10:56 +08:00
Lewis Russell
ad3472e291 fix(vim.system): resolve executable paths on windows
Fixes #31107
2024-11-08 16:29:44 +00:00
Lewis Russell
7342e6b00d perf(lsp): do not apply semantic tokens to folded lines
Fixes #31106
2024-11-08 14:01:35 +00:00
Luuk van Baal
5cfa7a72f8 refactor(message): propagate highlight id instead of attrs
Problem:  Highlight group id is not propagated to the end of the message call
          stack, where ext_messages are emitted.
Solution: Refactor message functions to pass along highlight group id
          instead of attr id.
2024-11-08 13:21:35 +01:00
bfredl
abe6a07c54 refactor(tests): continue the global highlight definition work 2024-11-08 13:19:15 +01:00
bfredl
475f9f64ef
Merge pull request #31073 from bfredl/cmdchar
fix(cmdline): simplify and correct grapheme cluster adjustment
2024-11-08 13:08:14 +01:00
bfredl
092042b43d fix(cmdline): simplify and correct grapheme cluster adjustment 2024-11-08 11:25:34 +01:00
bfredl
8ab1903092
Merge pull request #31040 from luukvbaal/cmdpreviewcurs
fix(inccommand): ensure cursor is where it belongs
2024-11-08 11:22:14 +01:00
zeertzjq
f83a31b49d
refactor(options): use os_win/os_buf for local options (#31060)
Conversely, don't use them for global options.
2024-11-08 06:54:28 +00:00