Commit Graph

24259 Commits

Author SHA1 Message Date
tae-soo-kim
bf9ad5db96
fix(diagnostic): sort diagnostics by column (#21457)
Sort diagnostics by column number in quickfix list
2022-12-18 08:17:15 -07:00
zeertzjq
6b3ae24a70
vim-patch:9.0.1072: screenpos() column result in fold may be too small (#21465)
Problem:    screenpos() column result in fold may be too small.
Solution:   Add space of 'number', sign column, etc. (closes vim/vim#11715)

ba2d191932
2022-12-18 21:26:17 +08:00
Mathias Fußenegger
1743359235
fix(diagnostic): clear stale cache on reset (#21454)
The BufWipeout autocmd is not 100% reliable and may leave stale entries
in the cache. This is sort of a hack/workaround to ensure
`vim.diagnostic.reset` calls don't fail if there are stale cache entries
but instead clears them

Fixes errors like

    Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: Invalid buffer id: 22
    stack traceback:
            [C]: in function 'nvim_exec_autocmds'
            /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: in function 'reset'
2022-12-17 19:19:15 -07:00
Christian Clason
1c4794944d
Merge pull request #21393 from folke/highlight_show
feat(lsp): add function to get semantic tokens at cursor
feat: `vim.inspect_pos()`, `vim.show_pos()` and `:Inspect[!]`
2022-12-17 13:43:46 +01:00
dundargoc
d65684f0c7
ci: bump stylua action to v2 (#21455) 2022-12-17 13:32:20 +01:00
Folke Lemaitre
ef91146efc
feat: vim.inspect_pos, vim.show_pos, :Inspect 2022-12-17 13:05:31 +01:00
zeertzjq
2d8bbe468e
Merge pull request #21450 from zeertzjq/vim-8.2.1210
vim-patch:8.2.{1208,1209,1210}: using ht_used when looping through a hashtab is less reliable
2022-12-17 09:28:44 +08:00
zeertzjq
b969844398 vim-patch:8.2.1210: using ht_used when looping through a hashtab is less reliable
Problem:    Using ht_used when looping through a hashtab is less reliable.
Solution:   Use ht_changed in a few more places.

1f22cc5cdb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-17 08:58:50 +08:00
zeertzjq
73a6000120 vim-patch:8.2.1209: Vim9: test failure
Problem:    Vim9: test failure.
Solution:   Add missing changes to hashtab.

21c16f868d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-17 08:58:50 +08:00
zeertzjq
d302c0e35e vim-patch:8.2.1208: build failure
Problem:    Build failure.
Solution:   Add missing change.

49fe0d6b28

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-17 08:58:50 +08:00
zeertzjq
4d860a5370
fix(folds): use long for number of folded lines (#21447)
Also remove some duplicate unsigned long casts.
2022-12-17 08:11:35 +08:00
Justin M. Keyes
37915cc5ab
Merge #21444 rename mch_msg => os_msg 2022-12-16 12:27:49 -05:00
Justin M. Keyes
a5207304dd refactor: rename mch_get_acl => os_get_acl 2022-12-16 17:40:06 +01:00
Justin M. Keyes
614d382621 refactor: rename mch_msg => os_msg 2022-12-16 17:33:52 +01:00
bfredl
b55ccb4324
Merge pull request #21440 from bfredl/scriptparm
refactor(params): open -s and -w script files after parsing commands
2022-12-16 12:53:41 +01:00
Lewis Russell
4ca3519a7a
refactor(option.c): reduce scope of locals (#21433)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-12-16 11:24:44 +00:00
bfredl
b6dda012ea refactor(params): open -s and -w script files after parsing commands
This will be needed for #18375 as only the server should open the.
scriptfile, and redirected stdin fd will need to be used.

Also executing actions in the middle of command_line_scan() is cringe.
2022-12-16 11:43:41 +01:00
zeertzjq
72a19b2ffe
fix(api): "emsg_silent" should imply "silent" in nvim_cmd (#21438) 2022-12-16 08:54:13 +08:00
zeertzjq
a2bf0cef10
vim-patch:9.0.1062: some test function names do not match what they are doing (#21429)
Problem:    Some test function names do not match what they are doing.
Solution:   Leave out user data for the test that is called "NoUserData".
            (closes vim/vim#11703)

4cd45f1408

Nvim's tests already match function names. Add missing indent changes
and a missing comment from patch 8.2.0084.
2022-12-16 06:08:59 +08:00
dundargoc
ef95174694
ci: add team reviewers (#21434)
Using team reviewers when possible reduces the churn on the git history
as we'll be able to add or remove reviewers without needing to change
the workflow files.

This requires using Github fine-grained personal access tokens with Pull
Requests set to "Read and write" and Members to "Read-only".
2022-12-15 20:40:30 +01:00
Lewis Russell
3091fa778a
Merge pull request #21426 from williamboman/fix/tbl_get-nil-return-val
fix(lua): always return nil values in vim.tbl_get when no results
2022-12-15 08:03:31 +00:00
William Boman
26c918d03f fix(lua): always return nil values in vim.tbl_get when no results
While `return` and `return nil` are for most intents and purposes
identical, there are situations where they're not. For example,
calculating the amount of values via the `select()` function will yield
varying results:

```lua
local function nothing() return     end
local function null()    return nil end

select('#', nothing()) -- 0
select('#', null())    -- 1
```

`vim.tbl_get` currently returns both nil and no results, which makes it
unreliable to use in certain situations without manually accounting for
these discrepancies.
2022-12-15 02:43:43 +01:00
Lewis Russell
0887ad1cbb
fix(ts): check buffer is loaded when restoring options (#21419)
fix(treesitter): check buffer is loaded when restoring options

Also restore spelloptions

Fixes #21416
2022-12-14 22:54:58 +00:00
Christian Clason
4a78ed60a3
vim-patch:9.0.1057: conflict between supercollider and scala filetype detection (#21417)
Problem:    Conflict between supercollider and scala filetype detection.
Solution:   Do not check for "Class : Method", it can appear in both
            filetypes. (Chris Kipp, closes vim/vim#11699)

70ef3f546b

Co-authored-by: Chris Kipp <ckipp@pm.me>
2022-12-14 19:46:17 +01:00
zeertzjq
6631df9107
fix(terminal): fix 'mousescroll' not respected in terminal mode (#21415) 2022-12-14 23:45:31 +08:00
Lewis Russell
d127c684fa
fix(treesitter): properly restore 'syntax' (#21358) 2022-12-14 15:00:48 +00:00
Christian Clason
04da043244
feat(lsp): add function to get semantic tokens at cursor 2022-12-13 18:59:27 +01:00
zeertzjq
090048bec9
vim-patch:9.0.1051: after a failed CTRL-W ] next command splits window (#21400)
Problem:    After a failed CTRL-W ] next command splits window.
Solution:   Reset postponed_split. (Rob Pilling, closes vim/vim#11698)

cb94c91070

Co-authored-by: Rob Pilling <robpilling@gmail.com>
2022-12-13 22:43:54 +08:00
zeertzjq
a6b05cb75d
vim-patch:9.0.0530: using freed memory when autocmd changes mark (#21396)
Problem:    Using freed memory when autocmd changes mark.
Solution:   Copy the mark before editing another buffer.

8ecfa2c56b

Nvim already copies the mark.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-13 10:47:39 +08:00
zeertzjq
0b20762c60
docs: remove "How-to disable mouse" menu item #21394 2022-12-12 17:43:49 -08:00
bfredl
a442c9f556
Merge pull request #21375 from nojnhuh/highlight-test
fix(tests): initialize Screen.colors in API highlight tests
2022-12-12 22:11:39 +01:00
Christian Clason
54d6a32fbd
feat(lsp): highlight semantic token modifiers (#21390)
Apply semantic token modifiers as separate extmarks with corresponding
highlight groups (e.g., `@readonly`). This is a low-effort PR to enable
the most common use cases (applying, e.g., italics or backgrounds on top
of type highlights; language-specific fallbacks like `@global.lua` are
also available). This can be replaced by more complicated selector-style
themes later on.
2022-12-12 20:43:14 +01:00
jdrouhard
3869a2e0cf
perf(lsp): update semantic tokens algorithm for parsing modifiers (#21383)
Instead of testing for every possible modifier type, only test bits up
to the highest set in the token array. Saves many bit ops and
comparisons when there are no modifiers or when the highest set bit is a
lower bit than the highest possible in the legend on average.

Can be further simplified when non-luaJIT gets the full bit module (see #21222)
2022-12-12 18:42:37 +01:00
Lewis Russell
d40d34aaa5
fix(diff): handle long lines without crashing (#21389)
Fixes https://github.com/neovim/neovim/issues/21388
2022-12-12 16:44:11 +00:00
ii14
49c240d3a2
docs: add links to extmarks and namespaces (#21378)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-12-12 15:15:31 +00:00
Phelipe Teles
8b9bf3e3b9
fix: vim.opt_local:append ignoring global option value (#21382)
Closes https://github.com/neovim/neovim/issues/18225
2022-12-12 15:14:50 +00:00
Christian Clason
3217a31f9b
vim-patch:7db29e4b5c3a (#21380)
* vim-patch:7db29e4b5c3a

Update runtime files

7db29e4b5c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-12 06:13:23 +01:00
Justin M. Keyes
1c324cb192
docs #20986
- https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most
  errors in pi_netrw.txt, so we can remove that workaround from
  ignore_parse_error().
- improved codeblock
2022-12-11 18:41:26 -08:00
dundargoc
b12bb97fee
docs: fix typos (#21328) 2022-12-12 08:53:07 +08:00
zeertzjq
407eef4738
vim-patch:9.0.1047: matchparen is slow (#21379)
Problem:    Matchparen is slow.
Solution:   Actually use the position where the match started, not the
            position where the search started. (closes vim/vim#11644)

79336e19cb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-11 23:02:41 +08:00
zeertzjq
3dadd3aca5
vim-patch:8.2.2870: CmdlineChange event triggered twice for CTRL-R (#21361)
Problem:    CmdlineChange event triggered twice for CTRL-R.
Solution:   Return CMDLINE_NOT_CHANGED from cmdline_insert_reg().
            (closes vim/vim#8219)

796139ae3a

Cherry-pick Test_cmdline_map_cmdlineChanged() from patch 8.2.2851.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-12-11 08:48:00 +08:00
Jon Huhn
ea8b828901 fix(tests): initialize Screen.colors in API highlight tests 2022-12-10 15:59:21 -06:00
zeertzjq
224473546c
fix(api): set correct curbuf when temporarily changing curwin (#21371)
This is the same code change as 6c87bbb4e4
2022-12-10 20:13:40 +08:00
fsouza
6d37d8cb17
fix(lsp): ignore null responses for semanticTokens request (#21364)
The spec indicates that the response may be `null`, but it doesn't
really say what a `null` response means. Since neovim raises an error if
the response is `null`, I figured that ignoring it would be the safest
bet.

Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2022-12-10 12:16:33 +01:00
James McCoy
f96fb23de6
Merge pull request #21363 from jamessan/fuse-vim-patches
fix(vim-patches): ensure libfuse is installed
2022-12-09 19:49:36 -05:00
zeertzjq
7faf8a45e8
fix(events): skip WinScrolled for newly-created float windows (#21333)
Unlike split windows, creating a new floating window does not cause
other windows to resize, so it doesn't make much sense to trigger
WinScrolled or WinResized when creating a new floating window.
2022-12-10 06:50:03 +08:00
Mathias Fußenegger
8b84a10db7
fix(lsp): fix get_active_clients bufnr parameter (#21366)
Follow up to https://github.com/neovim/neovim/pull/21337
2022-12-09 22:02:04 +01:00
Mathias Fußenegger
49df92da94
fix(lsp): correct some type annotations (#21365) 2022-12-09 19:18:31 +01:00
James McCoy
2ecb401f8b
fix(vim-patches): ensure libfuse is installed 2022-12-09 09:56:56 -05:00
zeertzjq
3cf0131c5c
vim-patch:9.0.1038: function name does not match what it is used for (#21359)
Problem:    Function name does not match what it is used for.
Solution:   Include the modifier in the name. (closes vim/vim#11679)

ffa4e9b43a
2022-12-09 20:09:03 +08:00