Jaehwang Jung
4d3acd6beb
fix(lsp): use "text" filetype for plaintext ( #17898 )
2022-03-28 09:16:11 -07:00
Smitesh Patil
a8e2c45b94
fix(diagnostic): make open_float
respect global diagnostic options ( #17879 )
...
* make `open_float` respect `scope` option set in `vim.diagnostic.config`
* Closes #17878
2022-03-27 08:10:03 -06:00
Jared Weakly
5e64d65df6
fix(filetype.lua): always return a string in getline helper function ( #17852 )
...
Uses of `getline` in `filetype.lua` currently assume it always returns a
string. However, if the buffer is unloaded when filetype detection runs,
`getline` returns `nil`. Fixing this prevents errors when filetype
detection is run on unloaded buffers.
2022-03-25 12:12:00 -06:00
Michael Lingelbach
69f1de86dc
feat: add vim.tbl_get ( #17831 )
...
vim.tbl_get takes a table with subsequent string arguments (variadic) that
index into the table. If the value pointed to by the set of keys exists,
the function returns the value. If the set of keys does not exist, the
function returns nil.
2022-03-24 12:01:04 -07:00
bfredl
e7391191e2
Merge pull request #17776 from bfredl/tsconceal
...
feat(ui): allow conceal to be defined in decorations
2022-03-20 18:59:20 +01:00
Tim Pope
af427dedf6
fix(lsp): set tabSize from 'shiftwidth', not 'softtabstop' ( #17787 )
...
The use of 'softtabstop' to set tabSize was introduced in 5d5b068
,
replacing 'tabstop'. If we look past the name tabSize and at the actual
purpose of the field, it's the indentation width used when formatting.
This corresponds to the Vim option 'shiftwidth', not 'softtabstop'.
The latter has the comparatively mundane purpose of controlling what
happens when you hit the tab key (and even this is incomplete, as it
fails to account for 'smarttab').
2022-03-20 10:41:46 -07:00
bfredl
6eca9b69c4
feat(ui): allow conceal to be defined in decorations
...
Unlike syntax conceal, change highlight of concealed char
Can be used in tree-sitter using "conceal" metadata.
2022-03-20 18:02:41 +01:00
dundargoc
d238b8f600
chore: fix typos ( #17670 )
...
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-03-17 13:21:24 +08:00
Jade Lovelace
5a8bf31d32
vim-patch:8.2.4571: not all gdb files are recognized ( #17727 )
...
Problem: Not all gdb files are recognized.
Solution: Add a few more patterns for gdb.
(closes https://github.com/vim/vim/pull/9956 )
8d5e514d77
2022-03-15 22:46:32 +01:00
zeertzjq
e263afc0e9
fix(paste): escape control characters in Cmdline mode
2022-03-15 18:15:18 +08:00
zeertzjq
a6eafc77ce
fix(paste): deal with trailing new line in chunk
2022-03-15 18:15:18 +08:00
zeertzjq
fcc6f66cf2
fix(paste): avoid edges cases caused by empty chunk
2022-03-15 18:15:18 +08:00
zeertzjq
21ba2d81a8
refactor(paste): do not print dots in cmdline mode
2022-03-15 18:15:18 +08:00
zeertzjq
bfb7754442
fix(paste): deal with eol and eof in Visual mode
2022-03-15 18:15:18 +08:00
zeertzjq
2601e0873f
fix(paste): don't move cursor past the end of pasted text in Normal mode
2022-03-15 18:15:18 +08:00
zeertzjq
9b1e1fbc9f
fix(paste): use getcmdtype() to determine whether in cmdline mode
2022-03-15 18:15:18 +08:00
Charlie Groves
1dbf8675c7
fix(remote): respect silent in error reporting
2022-03-11 11:16:46 -05:00
Charlie Groves
29c3632285
fix(remote): report on missing wait commands, typecheck lua results
...
Clean up lint errors, too
2022-03-11 11:16:46 -05:00
Charlie Groves
039e94f491
test(remote): add tests for --remote
...
This also fixes a fair number of issues found in running the tests
2022-03-11 11:16:46 -05:00
Charlie Groves
5862176764
feat(remote): add basic --remote support
...
This is starting from @geekodour's work at
https://github.com/neovim/neovim/pull/8326
2022-03-11 11:16:46 -05:00
bfredl
6170574d2f
Merge pull request #17660 from bfredl/luacomplete
...
feat(lua): handle lazy submodules in `:lua vim.` wildmenu completion
2022-03-10 15:46:18 +01:00
dundargoc
a7b1c8893c
chore: fix typos ( #17331 )
...
Co-authored-by: Hongyi Lyu <hongyi.lyu95@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-03-10 14:34:55 +08:00
bfredl
5ed60804fe
feat(lua): handle lazy submodules in :lua vim.
wildmenu completion
2022-03-09 15:25:06 +01:00
bfredl
f39a12d629
refactor(lua): make vim submodule lazy loading declarative
...
This will allow us to also use the same logic for lua threads and
processes, later.
2022-03-07 09:59:22 +01:00
Michael Lingelbach
3800615da9
fix(lsp): handle insertion of previous line ( #17618 )
2022-03-06 07:52:11 -08:00
zeertzjq
80e6f81862
docs(lua): reference runtime/lua/vim/_editor.lua
2022-03-06 22:32:22 +08:00
bfredl
2de4d3c7ac
Merge pull request #17603 from bfredl/luaworld
...
refactor(lua): move only runtime lua file in src/ to runtime/lua
2022-03-05 19:21:34 +01:00
Michael Lingelbach
a5e475fcc2
fix(lsp): start incremental sync range at previous newline character ( #17610 )
...
This change forces the start of an incremental sync range to begin always on an existing line.
2022-03-05 09:17:56 -08:00
bfredl
186a559818
refactor(lua): move only runtime lua file in src/ to runtime/lua
...
reorganize so that initialization is done in lua
2022-03-04 19:07:42 +01:00
bfredl
f9faba88fd
refactor(lua): reorganize builtin modules, phase 1
2022-03-03 20:03:30 +01:00
David Shen
5d6006f9bf
feat(diagnostic): add "code" to the diagnostic structure ( #17510 )
2022-03-02 18:42:27 -07:00
Tim Pope
d477788cd5
fix(lsp): respect all of 'fixeol', 'eol', and 'binary' applying edits ( #17574 )
2022-03-02 11:33:02 -08:00
bfredl
c65d93e60a
Merge pull request #16969 from shadmansaleh/enhance/ingore_nore_on_plug_keymaps
...
feat: ignore nore on <Plug> maps
2022-02-27 16:47:55 +01:00
shadmansaleh
c031e038df
chore: remove <Plug> detection from vim.keymap
2022-02-27 08:21:21 +06:00
bfredl
850b3e19c9
refactor(lua): cleanup and docs for threads
2022-02-26 15:00:13 +01:00
erw7
b87867e69e
feat(lua): add proper support of luv threads
2022-02-26 14:01:38 +01:00
Christian Clason
d0f8f76224
vim-patch:8.2.4464: Dtrace files are recognized as filetype D ( #17518 )
...
Problem: Dtrace files are recognized as filetype D.
Solution: Add a pattern for Dtrace files. (Teubel György, closes vim/vim#9841 )
Add some more testing.
4d56b971cb
2022-02-26 14:01:37 +01:00
Christian Clason
10a46a20ce
refactor(highlight)!: optional arguments for highlight.range as table ( #17462 )
...
also update documentation
BREAKING CHANGE: signature of highlight.range is now
vim.highlight.range(bufnr, ns, hlgroup, start, finish,
{ regtype = regtype, inclusive = inclusive, priority = priority })
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2022-02-21 21:21:42 +01:00
Michael Lingelbach
d80c9b9259
fix(diagnostic): use botright copen for qflist ( #17475 )
...
This matches the LSP handlers, and forces the qflist for diagnostics to
span across the horizontal space, below all open windows.
2022-02-20 13:44:14 -08:00
Michael Lingelbach
6a3acccd8b
fix(lsp): use botright copen for all handlers ( #17471 )
2022-02-20 11:09:01 -08:00
Christian Clason
439a843b80
vim-patch:8.2.4424: ".gts" and ".gjs" files are not recognized ( #17464 )
...
Problem: ".gts" and ".gjs" files are not recognized.
Solution: Recognize Glimmer flavored typescript and javascript.
(closes vim/vim#9799 )
cdf717283c
2022-02-19 23:41:11 +01:00
Michael Lingelbach
791e400858
fix: lsp and diagnostic highlight priority ( #17461 )
...
Closes https://github.com/neovim/neovim/issues/17456
* treesitter uses the default highlight priority of 50
* diagnostic highlights have a priority of 150
* lsp reference highlights have a priority of 200
This ensures proper ordering.
2022-02-19 08:38:14 -08:00
Christian Clason
36362ef0ae
vim-patch:8.2.4414: solidity files are not recognized ( #17451 )
...
Problem: Solidity files are not recognized.
Solution: Add the *.sol pattern. (Dundar Goc, closes vim/vim#9792 )
97b231541d
2022-02-18 17:08:43 +01:00
Christian Clason
1fd106ca88
vim-patch:8.2.4411: bicep files are not recognized ( #17447 )
...
Problem: Bicep files are not recognized.
Solution: Match *.bicep files. (Dundar Goc, closes vim/vim#9791 )
8e5ba693ad
2022-02-17 23:05:48 +01:00
Stephan Seitz
8ab5ec4aaa
feat(tree-sitter): allow Atom-style capture fallbacks ( #14196 )
...
This allows falling back to `@definition` when we have no mapping
`@definition.fancy-specialization`.
This behavior is described in tree-sitter's documentation
(https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme ).
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/738
2022-02-16 19:38:19 +01:00
Chinmay Dalal
e481901748
docs: treesitter.txt - fix overflowing lines, document minimum_language_version ( #17286 )
2022-02-13 14:43:25 +01:00
Christian Clason
3b13c7fc8b
vim-patch:8.2.4352: ReScript files are not recognized
...
Problem: ReScript files are not recognized.
Solution: Add the *.res and *.resi patterns. (Ananda Umamil, closes vim/vim#9752 )
0c3cc2fec3
2022-02-12 12:04:09 +01:00
Christian Clason
4761dd4fc2
Merge pull request #17365 from kevinhwang91/fix-ts-empty-lines
...
fix(query.lua): check empty table for lines
2022-02-11 15:19:19 +01:00
Lajos Koszti
f6329ea137
fix(lsp): correct prefix when filterText is present ( #17051 )
...
LSP server might return an item which would replace a token to another.
For example in typescript for a `jest.Mock` object `getProductsMock.`
text I get the following response:
```
{
commitCharacters = {
".",
",",
"("
},
data = {
entryNames = {
"Symbol"
},
file = "/foo/bar/baz.service.spec.ts",
line = 268,
offset = 17
},
filterText = ".Symbol",
kind = 6,
label = "Symbol",
sortText = "11",
textEdit = {
newText = "[Symbol]",
range = {
end = {
character = 16,
line = 267
},
start = {
character = 15,
line = 267
}
}
}
},
```
In `lsp.omnifunc` to get a `prefix` we call the `adjust_start_col` which
then returns the `textEdit.range.start.character`.
Th `prefix` then be the `.` character. Then when filter the items with
`remove_unmatch_completion_items`, every item will be filtered out,
since no completion word starts `.`.
To fix we return the `end.character`, which in that particular case will
be the position after the `.`.
2022-02-11 14:04:15 +01:00
kevinhwang91
afcf64479c
fix(query.lua): check empty table for lines
...
The range of node may make `nvim_buf_get_lines` return an empty table.
2022-02-11 14:44:37 +08:00