Commit Graph

2776 Commits

Author SHA1 Message Date
James McCoy
b940cbb858
Merge pull request #13417 from shade-of-noon/man_count.13411
runtime: Fix man.vim count handling.
2020-12-04 18:36:54 -05:00
Björn Linse
6c344a75d4
Merge pull request #13173 from tjdevries/tjdevries/option_info
api: add option metadata
2020-12-04 13:45:32 +01:00
TJ DeVries
ced951c2aa api/options: fixup 2020-12-04 13:29:44 +01:00
Jan Edmund Lazo
2bcae20242
vim-patch:8.2.2085: Qt translation file is recognized as typescript
Problem:    Qt translation file is recognized as typescript.
Solution:   Check the first line for "<?xml". (closes vim/vim#7418)
c0d670ce16
2020-12-03 18:58:30 -05:00
Mathias Fußenegger
f5e0f17968
lsp: Change diagnosticg.get_all to return {bufnr: Diagnostic[]} (#13310)
Allows users to associate the diagnostics with the right bufnr.
2020-12-03 14:22:15 -05:00
runiq
5c7141cc71
lsp: Make open_floating_preview buffers ephemeral (#13437)
Fixes #13429.
2020-12-03 14:20:56 -05:00
eightpigs
fa73bb70fc
lsp: Fix "unsupported_method" error when the buffer does not have an LSP Server (#13175) 2020-12-03 01:00:54 -05:00
Björn Linse
72c22862dc
Merge pull request #12235 from dm1try/add_init_lua
add init.lua as an alternative user config
2020-12-01 18:54:50 +01:00
Björn Linse
f88c2490c7
Merge pull request #13425 from bfredl/secretcharm
ex_getln: add secret charm
2020-12-01 17:32:48 +01:00
dm1try
c65d3fd67b doc: mention init.lua
use a generic name instead of "init.vim" in starting.txt
2020-12-01 10:51:31 +01:00
Yegappan Lakshmanan
e20ee69952 Update vim_diff.txt 2020-11-30 20:48:52 -08:00
Björn Linse
bed9839f46 ex_getln: add secret charm
Opt in to this secret world using

    set wildchar=0
    " already the default, but remove if non-zero existing config:
    set wildcharm=0

now you can map 'wildmode' just like any mode:

    cnoremap <tab> <c-z>
    function! Spacey()
      return getcmdline()[-1:] == "/" ? "\<bs>" : ""
    endfunc
    cnoremap <expr> / wildmenumode() ? Spacey()."/<c-z>" : "/"

Possibly asked questions:

What about backwards compatibility?
====

Just do nothing and your existing 'wildchar' and 'wildcharm' will keep working.

Doesn't `<c-z>` mean suspend?
====

Not in cmdline mode. If it would then the recommended wildcharm would not
have been `<c-z>` to start with.

My config relies on `:<c-z>` being a synonym to `:<nop>`!
====
just no.
2020-12-01 00:57:52 +01:00
Edwin Pujols
ba2e94d223 runtime: Fix man.vim count handling.
Here I use a negative number to decide whether the count has been
explicitly set. I think it unlikely that negative sections will ever be
created given that negative numbers complicate argument handling:
```
$ man -1 foo
man: invalid option -- '1'
```
and given that there's already precedence for alphanumeric sections like
`3p`, `3x`, `n`, etc.

---

This does work, though:
```
$ man -S -3 baz
```
With `man baz.-3` and `man 'baz(-3)'`, (GNU) man *might* consider `-3`
internally as a section, but in the end reports as if the whole
argument was the name of a topic:
```
$ man 'baz(-3)'
No manual entry for baz(-3)
```

---

Closes #13411.
2020-11-29 19:56:15 -04:00
Jan Edmund Lazo
aec61074a9
Merge pull request #13404 from jarimayenburg/filetype_docker
[RDY] runtime: Updated Dockerfile syntax with latest from Vim upstream
2020-11-29 11:31:14 -05:00
Jari Maijenburg
abb61cd01a runtime/dockerfile.vim: ebdf3c964a901fc00c9009689f7cfda478342c51
Port only dockerfile.vim from upstream
ebdf3c964a
2020-11-29 16:31:09 +01:00
Jari Maijenburg
ff1e3048cc runtime/dockerfile.vim: 560979ed4f0216f902a2c247e937f00a27dcb198
Port only dockerfile.vim from upstream
560979ed4f
2020-11-29 16:30:31 +01:00
Damien Rajon
dc6593a84a
doc: fix lsp statusline examle (#13286)
Co-authored-by: Damien Rajon <damien@askmarty.io>
2020-11-29 14:24:52 +01:00
Yuki Ito
900228a20f lsp: Reduce memory usage for buffering the message from LSP. 2020-11-29 06:49:44 +09:00
Jan Edmund Lazo
a35c54b2ae
vim-patch:8.2.0095: cannot specify exit code for :cquit (#13407)
Problem:    Cannot specify exit code for :cquit.
Solution:   Add optional argument. (Thinca, Yegappan Lakshmanan, closes vim/vim#5442)
1860bde9d3

Co-authored-by: erw7 <erw7.github@gmail.com>
2020-11-28 21:28:57 +01:00
Jan Edmund Lazo
d956842751
Merge pull request #13397 from adrian5/filetype-gitrebase
runtime: Patch gitrebase filetype
2020-11-27 09:20:33 -05:00
adrian5
70c2849bc9 gitrebase.vim: patch runtime/syntax to 664f3cf3f21
vim/vim@664f3cf3f2
2020-11-27 04:30:56 +01:00
adrian5
23ef9d2dbc gitrebase.vim: patch runtime/syntax to c08ee7476b1
vim/vim@c08ee7476b
2020-11-27 04:28:07 +01:00
adrian5
37e2751c37 gitrebase.vim: patch runtime/ftplugin to c08ee7476
vim/vim@c08ee7476b
2020-11-27 04:16:36 +01:00
Raphael
0e7f965a1b
use if_nil variable replace vim.F.if_nil 2020-11-26 14:32:38 +08:00
Jan Edmund Lazo
4537ff659e
Merge pull request #13375 from janlazo/vim-8.2.2041
vim-patch:8.1.{2290,2390},8.2.{242,257,302,303,462,991,996,2041,2042,2043,2047,2048,2049,2054}
2020-11-25 22:48:53 -05:00
Raphael
dd00c74737
Lsp: fix vim.F.ifnil to vim.F.if_nil (#13384) 2020-11-25 21:17:03 -05:00
Michael Lingelbach
0d83a1c43f
LSP: Feature/add workspace folders (#12638)
* First implementation of workspace folders
* Add completion for current directory
* Add tracking of workspace folders
* Add workspace folder listing
* Add checks on adding/removing workspaces
* Add appropriate initialization options
* Add documentation
* Make workspaceFolders available wherever client is
2020-11-25 21:07:02 +01:00
Björn Linse
ca7fa2a43a
Merge pull request #13357 from vigoux/luahl-priority
feat(luahl): add priority mechanism
2020-11-25 12:43:08 +01:00
Thomas Vigouroux
c0a6989d93
feat(luahl): add priority mechanism
Base priority is 0x1000, in order to stay kinda backward compatible.
Also set tree-sitter default highlight to 100 (middle-ish value)
2020-11-25 10:10:05 +01:00
Jan Edmund Lazo
8d7fa8962b
vim-patch:8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Problem:    Using "aucmdwin" in win_gettype() is not ideal.
Solution:   Rename to "autocmd".
40a019f157
2020-11-25 02:46:20 -05:00
Jan Edmund Lazo
9b2efe6b7d
vim-patch:8.2.0991: cannot get window type for autocmd and preview window
Problem:    Cannot get window type for autocmd and preview window.
Solution:   Add types to win_gettype(). (Yegappan Lakshmanan, closes vim/vim#6277)
0fe937fd86

Cherry-pick test_preview.vim,test_window_cmd.vim changes
from patch v8.2.0522.
2020-11-25 02:45:00 -05:00
Jan Edmund Lazo
ede747c2cc
vim-patch:8.2.0257: cannot recognize a terminal in a popup window
Problem:    Cannot recognize a terminal in a popup window.
Solution:   Add the win_gettype() function.
00f3b4e007
2020-11-25 02:10:44 -05:00
Jan Edmund Lazo
ec53d43f84
vim-patch:8.2.2041: haskell filetype not optimally recognized
Problem:    Haskell filetype not optimally recognized.
Solution:   Recognize all *.hsc files as Haskell. (Marcin Szamotulski,
            closes vim/vim#7354)
a09bee322e
2020-11-24 22:03:36 -05:00
bkegley
21eb2e5ef8
fix(treesitter): docs reflect parser:parse()
Update docs to document that `parser:parse()` now returns a table of trees
2020-11-24 20:56:47 -06:00
Thomas Vigouroux
e6d1656831
languagetree: call changedtree callback per tree
Also fix a typo
2020-11-24 16:53:03 +01:00
shade-of-noon
71d4f5851f
man.vim: Use page title instead of full path. (#13353)
In commit 63f0ca3263, `tagfunc` was introduced to
`runtime/autoload/man.vim`. Nonetheless the tag function instead
of using a short buffer name (e.g. `man://foo(3)`) uses the full
path to the man page (e.g. `man:///usr/share/.../foo.3.gz`). This
behaviour is inconsistent with `:Man!`, thus this commit.

Closes #13334
2020-11-24 09:48:06 +01:00
saadparwaiz1
60158dfb81
checkhealth: support virtual env dir with spaces 2020-11-24 09:39:11 +01:00
Thomas Vigouroux
2d36b62eda
Merge pull request #13270 from vigoux/ts-range-ranges
treesitter: allow table to be used as ranges
2020-11-23 18:42:08 +01:00
Thomas Vigouroux
52d76f0a32
fix(treesitter): allow ranges in set_included_ranges 2020-11-23 15:09:32 +01:00
Jan Edmund Lazo
1aae464222
vim-patch:8.1.2115: MS-Windows: shell commands fail if &shell contains a space
Problem:    MS-Windows: shell commands fail if &shell contains a space.
Solution:   Use quotes instead of escaping. (closes vim/vim#4920)
2efc44b3f0

Always double-quote &shell if it contains a space.
Neovim does not support escaping space with backslash, unlike Vim.

N/A patches for version.c:

vim-patch:8.0.1455: if $SHELL contains a space then 'shell' is incorrect

Problem:    If $SHELL contains a space then the default value of 'shell' is
            incorrect. (Matthew Horan)
Solution:   Escape spaces in $SHELL. (Christian Brabandt, closes vim/vim#459)
4bfa8af141

vim-patch:8.2.1194: test failure because shell prompt differs

Problem:    Test failure because shell prompt differs.
Solution:   Set the shell prompt.
a4dc6f92bb
2020-11-23 07:45:24 -05:00
Steven Sojka
1a631026a9
feat(treesitter): add language tree
Implement the LanguageTree structure to enable language injection.

This is done be removing the old Parser metatable and replacing by the
new structure, with the same API (almost).

Some noticeable differences :
  - `parser:parse()` now returns a table of trees
  - There is no incremental parsing for child (injected) languages

Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-11-23 08:06:17 +01:00
Jan Edmund Lazo
cd691f2b6f
Merge pull request #13333 from adrian5/filetype-xml
runtime: Patch xml, xmllint, xmlformat filetypes
2020-11-22 22:01:15 -05:00
Jan Edmund Lazo
ee8f530b40
Merge pull request #13348 from adrian5/filetype-gitconfig
runtime: Patch gitconfig.vim syntax
2020-11-22 21:41:34 -05:00
Jan Edmund Lazo
093c44d697
Merge pull request #13351 from janlazo/vim-8.1.1598
vim-patch:8.1.{1598,1601,2332},8.2.2032
2020-11-22 19:42:28 -05:00
adrian5
2d35706b97 xml.vim: patch runtime/syntax to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:47:39 +01:00
adrian5
f1b826778e xml.vim: patch runtime/syntax to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:45:05 +01:00
adrian5
4230c54660 xml.vim: patch runtime/indent to 4ceaa3a6e0b8cb299
vim/vim@4ceaa3a6e0
2020-11-22 22:42:02 +01:00
adrian5
e175cebf17 xml.vim: patch runtime/indent to 96f45c0b6fc9e9d40
vim/vim@96f45c0b6f
2020-11-22 22:40:08 +01:00
adrian5
fad90537c2 xmllint.vim: patch runtime/compiler to 1c6737b20a5
vim/vim@1c6737b20a
2020-11-22 22:36:17 +01:00
Jan Edmund Lazo
6068b907cb
Merge pull request #13345 from shade-of-noon/lingering-e145
Remove leftover handling of restricted mode.
2020-11-22 16:11:22 -05:00