Commit Graph

27453 Commits

Author SHA1 Message Date
Maria José Solano
15983cf2c6
fix(lsp): cancel session when leaving snippet region (#25762) 2023-10-26 07:29:05 +02:00
nwounkn
9de157bce4
fix(float): win_get_bordertext_col returning negative column number (#25752)
Problem:
  `win_get_bordertext_col` returns column < 1 for right or center
  aligned text, if its length is more than window width.

Solution:
  Return max(resulting_column, 1)
2023-10-26 11:44:28 +08:00
zeertzjq
f2fc44550f
vim-patch:9.0.2064: cannot use buffer-number for errorformat (#25782)
Problem:  cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
          'errorformat'

closes: vim/vim#13419

b731800522

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-26 07:42:29 +08:00
zeertzjq
bfe8a39512
vim-patch:partial:5985879e3c36 (#25780)
runtime(doc): Fix typos in several documents (vim/vim#13420)

* Fix typos in several documents
* Update runtime/doc/terminal.txt

5985879e3c

Skip runtime/doc/indent.txt: not ported yet

Co-authored-by: h_east <h.east.727@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
2023-10-26 06:41:54 +08:00
zeertzjq
3347519dd7
vim-patch:9.0.2065: EXPAND flag set for filetype option (#25779)
Problem:  EXPAND flag set for filetype option
Solution: Remove P_EXPAND flag from the 'filetype' option

Remove P_EXPAND flag from the 'filetype' option

Problem:  P_EXPAND flag is erroneously set for 'filetype' option
Solution: Remove the P_EXPAND flag

This flag is used by string options that accept file path values.  See
:help set_env.

This appears to have been included in d5e8c92 and resulted from an
incorrect implementation of 'filetype' completion.

See vim/vim#12900 for a small discussion.

related: vim/vim#12900
closes: vim/vim#13416

3932072ab4

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-26 06:34:56 +08:00
zeertzjq
684e93054b
fix(terminal): assign channel to terminal earlier (#25771) 2023-10-25 09:59:02 +08:00
dundargoc
1094d0c0db build: add CMAKE_C_FLAGS to --version output
Closes https://github.com/neovim/neovim/issues/25754.
2023-10-24 11:09:15 +02:00
Christian Clason
0b1ec3b162 vim-patch:9.0.2063: pacman hooks are detected as conf filetype
Problem:  pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
          hooks as confini

Because confini has much better syntax highlighting than conf.

For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.

closes: vim/vim#13399

7d254dbc2d

Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-24 10:15:47 +02:00
Christian Clason
4f0adb6a78 vim-patch:9.0.2062: Janet files are not recognised
Problem:  Janet files are not recognised
Solution: Add filename and shebang detection (without
          adding an extra filetype plugin)

Those are used by the Janet language:
http://www.janet-lang.org

closes: vim/vim#13400

c038427d2a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-24 10:15:47 +02:00
Christian Clason
94fee35446 vim-patch:9.0.2061: not able to detect xkb filetypes
Problem:  not able to detect xkb filetypes
Solution: Detect files below /u/s/X11/xkb as xkb files (without adding
          an extra filetype)

Those files are used from the X11 xkb extension

closes: vim/vim#13401

ae9021a840

Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-24 10:15:47 +02:00
Christian Clason
5f0224e848 vim-patch:9.0.2060: *.{gn,gni} files are not recognized
Problem:  *.{gn,gni} files are not recognized
Solution: Detect some as gn filetype (without adding an extra filetype)

Those come from: https://gn.googlesource.com/gn/

closes: vim/vim#13405

84394f2be4

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-10-24 10:15:47 +02:00
zeertzjq
d432bba4e4
fix(marks): handle switching buffer properly (#25763) 2023-10-24 16:10:36 +08:00
dundargoc
25cfe3fd43 build: enable formatting during rebase
Closes https://github.com/neovim/neovim/issues/25654
2023-10-23 21:48:06 +02:00
dundargoc
5f03a1eaab build(lint): remove unnecessary clint.py rules
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
2023-10-23 20:06:21 +02:00
Christian Clason
e606604322 vim-patch:fea96c00e55a
runtime(vim): Update ftplugin - comment motions (vim/vim#13412)

Fix the pattern used by comment-motion mappings to match the start of a
block comment.

Block-comment start lines were being ignored if the previous line
contained a double-quote character anywhere in the line.  Line comments
should only be ignored if the previous line is a full-line comment and,
therefore, part of the current block comment.

fea96c00e5

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-10-23 19:48:50 +02:00
Maria José Solano
94127cb5df fix(lsp): do not add extra indentation 2023-10-23 17:21:41 +02:00
Maria José Solano
370232dbef fix(lsp): track snippet deletion 2023-10-23 17:21:41 +02:00
Mathias Fussenegger
5e5f5174e3 fix(lsp): fix off-by-one error for omnifunc word boundary
Fixes https://github.com/neovim/neovim/issues/25177

I initially wanted to split this into a refactor commit to make it more
testable, but it appears that already accidentally fixed the issue by
normalizing lnum/col to 0-indexing
2023-10-23 08:26:38 +02:00
dundargoc
bc850ba2a0 ci: run tests in parallel
This will run the three test suites (unit, functional and old) in
parallel, meaning that neovim is built for each test and run separately.
This has a slight increase in total CI usage, but it allows rerunning
only the specific test suite that failed for flaky tests, which will
save some time.

Ideally we'd remove any drawbacks by building neovim once and reusing it
for each test suite, but that is not currently possible due to poor
upload/download speeds of the upload-artifact and download-artifact
actions. This has been addressed in
https://github.com/actions/toolkit/pull/1488, but will only be made
available in upload-artifact@v4 and download-artifact@v4.
2023-10-22 16:13:34 +02:00
dundargoc
3a3e025126 ci: install perl provider on mac
Perl provider installation was previously disabled on mac due to a
version conflict in 79bf507449. It is no
longer present, so we enable it.
2023-10-21 21:54:11 +02:00
bfredl
999879a512
Merge pull request #25741 from famiu/fix/options/modified
fix(options): `'modified'` showing incorrect value for scratch buffers
2023-10-21 21:46:51 +02:00
Famiu Haque
9d01385c6c fix(options): 'modified' showing incorrect value for scratch buffers
Problem: #25716 removed the logic for getting the correct value of the `'modified'` option when using `nvim_buf_get_option()`. So the function now returns an incorrect value of `'modified'` for scratch buffers.

Solution: Re-add the logic for getting the correct value of `'modified'`. Also make it so that the logic only exists in one place instead of being duplicated across multiple places in the code.
2023-10-22 01:17:27 +06:00
bfredl
40574b424f
Merge pull request #25624 from glepnir/fix_25598
feat(complete): support f flag for complete buffer name part
2023-10-21 15:52:47 +02:00
Christian Clason
752c6ce4ad build(deps): bump luajit to HEAD - e826d0c10 2023-10-21 14:14:12 +02:00
glepnir
ae4ca4edf8 feat(complete): support f flag for complete buffer part 2023-10-21 20:06:36 +08:00
Mathias Fussenegger
195301c609 refactor(lsp): deprecate completion util methods
Relates to https://github.com/neovim/neovim/issues/25272
2023-10-21 13:49:05 +02:00
Mathias Fussenegger
1e10310f4c refactor(lsp): move completion logic into _completion module
To reduce cross-chatter between modules and for https://github.com/neovim/neovim/issues/25272
Also preparing for https://github.com/neovim/neovim/issues/25714
2023-10-21 13:49:05 +02:00
zeertzjq
9971bea6f1
vim-patch:9.0.2059: outstanding exceptions may be skipped (#25736)
Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: vim/vim#13386

0ab500dede

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-21 18:46:52 +08:00
zeertzjq
c049ce56cd
vim-patch:9.0.2058: tests: avoid error when no swap files exist (#25735)
Problem:  tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
          in case the variable does not exists

When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.

So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.

closes: vim/vim#13396

a36acb7ac4
2023-10-21 18:14:32 +08:00
zeertzjq
fc02908c97
vim-patch:d3e277f279ed (#25734)
matchparen: do not use hard-coded match id (vim/vim#13393)

* matchparen: do not use hard-coded match id

Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().

For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).

closes: vim/vim#13381

d3e277f279

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-10-21 18:04:08 +08:00
Maria José Solano
f1775da07f
feat(lsp): add snippet API (#25301) 2023-10-21 08:51:26 +02:00
Jorge Mederos
3304449946
fix(lsp): log unknown diagnostic tags instead of showing a warning (#25705)
To be more in line with the specification:

> To support the evolution of enumerations the using side of an enumeration shouldn’t fail on an enumeration value it doesn’t know. It should simply ignore it as a value it can use and try to do its best to preserve the value on round trips
2023-10-21 08:47:14 +02:00
zeertzjq
7a6e27958a
ci(cirrus): don't run lua/help_spec (#25498) 2023-10-21 07:21:19 +08:00
zeertzjq
ad2fad9a3b
fix(event-loop): flush UI when no input is available (#25728)
Problem:  With lots of events, UI flush may be delayed for too long.
Solution: Flush UI when no input is available. This still flushes less
          frequently than before #25629, when a flush also happens when
          typeahead buffer is empty but input is available.
2023-10-20 23:02:56 +08:00
Famiu Haque
6c87d3e0fb refactor(options): get_option_value_strict() and SREQ_*
`SREQ_*` values are now actual typedef'd enums. `get_option_value_strict()` has also been refactored and split into two functions, `get_option_attrs()` for getting the option attributes, and `get_option_value_strict()` for getting the actual value. Moreover, it now returns an `OptVal`. Other miscellaneous refactors have also been made.
2023-10-20 13:35:47 +01:00
Christian Clason
f4b896198f vim-patch:9.0.2056: no digraph for quadruple prime
Problem:  no digraph for quadruple prime
Solution: add quadruple prime digraph using 4'

closes: vim/vim#13380

47416d1a74

Co-authored-by: Jonathan Wright <quaggy@gmail.com>
2023-10-20 13:03:36 +02:00
Gregory Anders
594ff34581
vim-patch:d5dc58aeed1b (#25720)
runtime(json5): Add new ftplugin (vim/vim#13385)

d5dc58aeed

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-10-19 16:22:51 -05:00
Gregory Anders
2c9d4ef459
Merge pull request #25717 from gpanders/vim-e08bfef88bd0
vim-patch:e08bfef88bd0, vim-patch:9.0.2053
2023-10-19 14:30:19 -05:00
Gregory Anders
3ea13bca14 vim-patch:9.0.2053: zig filetype detection test wrong
Problem:  zig filetype detection test wrong
Solution: Remove .zir pattern, add new test for .zon pattern

closes: vim/vim#13389

a8c664a042

Co-authored-by: Gregory Anders <greg@gpanders.com>
2023-10-19 13:06:58 -05:00
Gregory Anders
e6d352d8d7 vim-patch:e08bfef88bd0
runtime(zig): Update Zig runtime files (vim/vim#13388)

Update runtime files from upstream (https://github.com/zig/zig.vim) at
commit 54c216e5306a5c3878a60596aacb94dca8652ab9.

e08bfef88b

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2023-10-19 10:20:55 -05:00
Maria José Solano
315c711700 fix(treesitter): set cursor position when opening inspector 2023-10-19 14:54:10 +02:00
zeertzjq
a096165977
vim-patch:9.0.2050: Vim9: crash with deferred function call and exception (#25715)
Problem:  Vim9: crash with deferred function call and exception
Solution: Save and restore exception state

Crash when a deferred function is called after an exception and another
exception is thrown

closes: vim/vim#13376
closes: vim/vim#13377

c59c1e0d88

The change in check_due_timer() is N/A as Nvim calls timer callbacks on
the main loop.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 18:34:48 +08:00
Pham Huy Hoang
ae7020c667 fix(docs): fix TSNode incorrect signatures 2023-10-19 09:23:13 +01:00
James McCoy
a8fc94a2fd build(deps): include Find module
Now that all the Find<Foo>.cmake modules are using our custom
find_path2, the bundled deps build needs to include the Find module so
it has access to find_path2.

The missing include was causing the PPA build to fail:

```
cd .deps && \
	cmake -G 'Unix Makefiles'   \
	-DUSE_EXISTING_SRC_DIR=ON -DUSE_BUNDLED_LUAROCKS=OFF -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_GPERF=OFF -DUSE_BUNDLED_LUA=OFF /<<PKGBUILDDIR>>//cmake.deps
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found GNU Make at /usr/bin/make
-- CMAKE_BUILD_TYPE not specified, default is 'Debug'
-- Performing Test HAS_OG_FLAG
-- Performing Test HAS_OG_FLAG - Success
-- Found Git: /usr/bin/git (found version "2.17.1")
CMake Error at /<<PKGBUILDDIR>>/cmake/FindLuajit.cmake:1 (find_path2):
  Unknown CMake command "find_path2".
Call Stack (most recent call first):
  cmake/BuildLuv.cmake:13 (find_package)
  CMakeLists.txt:127 (include)

-- Configuring incomplete, errors occurred!
```
2023-10-18 23:47:20 +02:00
zeertzjq
c49cfd89fd
Merge pull request #25703 from zeertzjq/vim-9.0.2044
vim-patch:9.0.{2044,2045}
2023-10-18 19:19:02 +08:00
zeertzjq
09fb243bdd vim-patch:9.0.2045: tests: checking for swap files takes time
Problem:  tests: checking for swap files takes time
Solution: don't check for swap files  when test has been skipped

Check for swap files takes a considerable about of time, so don't do
that for skipped tests to avoid wasting time.

closes: vim/vim#13371

a0e1f06f04
2023-10-18 18:30:20 +08:00
zeertzjq
9e3640a779 vim-patch:9.0.2044: Vim9: exceptions confuse defered functions
Problem:  Vim9: exceptions confuse defered functions
Solution: save and restore exception state when calling defered
          functions

closes: vim/vim#13364
closes: vim/vim#13372

0672595fd5

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-18 18:29:47 +08:00
dundargoc
831d662ac6 build: add sub-targets to the doc target
It's easier to debug and to customize scripting if there are sub-targets
that build up each target.
2023-10-18 11:18:38 +02:00
Christian Clason
eadedfd908 vim-patch:5a33ce2a661f
runtime(json5): include syntax script for json5 (vim/vim#13356)

Merging syntax file from gutenye/json5.vim, modified to include proper
vim header.

See: https://github.com/vim/vim/issues/8499

5a33ce2a66

Co-authored-by: Rolf Vidar Mazunki Hoksaas <32819373+mazunki@users.noreply.github.com>
Co-authored-by: Guten Ye <ywzhaifei@gmail.com>
2023-10-18 09:09:33 +02:00
zeertzjq
366d0c7887
fix(move): check the correct buffer (#25698) 2023-10-18 10:34:55 +08:00