aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* fix(lsp): small bugs in snippet-parser #18998L3MON4D32022-06-29
| | | | | | | | | This fixes the following bugs: `${1:else_text}` -> format with if_text: "else_text" `${1:-else_text}` -> format with if_text: "else_text" `${1:}` in `format` (eg. empty else_text) -> error. `${1:}` (eg. empty placeholder) -> error. Thanks hrsh7th :)
* vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)Christian Clason2022-06-29
| | | | | Problem: Not all Visual Basic files are recognized. Solution: Change detection of *.cls files. (Doug Kearns) https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252
* vim-patch:9.0.0005: hare files are not recognized (#19151)Christian Clason2022-06-29
| | | | | Problem: Hare files are not recognized. Solution: Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630) https://github.com/vim/vim/commit/040674129f3382822eeb7b590380efa5228124a8
* feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filterFamiu Haque2022-06-28
| | | | | | Also fixes a memory leak in `parse_cmdline`. Closes #18954.
* fix(vim.ui.input): accept nil or empty "opts" #191090x74696d6d792022-06-28
| | | Fix #18143
* vim-patch:069a7d561bbe (#19130)Christian Clason2022-06-27
| | | | Update runtime files https://github.com/vim/vim/commit/069a7d561bbe7e3b9bf132f71b7121c59f99e8f1
* fix(filetype): check for non-nil match in detect.rules (#19129)Christian Clason2022-06-27
|
* vim-patch:partial:8a3b805c6c9c (#19104)Christian Clason2022-06-27
| | | | | | | Update runtime files https://github.com/vim/vim/commit/8a3b805c6c9cae341d560df9c3567ebbe42a7404 skip builtin.txt (needs 8.2.4838) skip message.txt (whitespace changes)
* refactor(filetype): allow vim.filetype.match to accept buf and filename (#19114)Gregory Anders2022-06-27
| | | | | | | This is necessary in cases where filetype detection acts recursively. For example, when matching files that end with .bak, the "root" of the filename is matched again against the same buffer (e.g. a buffer named "foo.c.bak" will be matched again with the filename "foo.c", using the same underlying buffer).
* refactor(filetype)!: allow vim.filetype.match to use different strategies ↵Gregory Anders2022-06-26
| | | | | | | | | | | | | | | | | | | (#18895) This enables vim.filetype.match to match based on a buffer (most accurate) or simply a filename or file contents, which are less accurate but may still be useful for some scenarios. When matching based on a buffer, the buffer's name and contents are both used to do full filetype matching. When using a filename, if the file exists the file is loaded into a buffer and full filetype detection is performed. If the file does not exist then filetype matching is only performed against the filename itself. Content-based matching does the equivalent of scripts.vim, and matches solely based on file contents without any information from the name of the file itself (e.g. for shebangs). BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead of `vim.filetype.match(name, bufnr)`
* vim-patch:e1dc76fbf333 (#19092)Christian Clason2022-06-25
| | | | Update runtime files https://github.com/vim/vim/commit/e1dc76fbf333243ecfdfc3c0a81ea9984913b4f5
* fix: make_filter_cmd for :! powershell #15913Enan Ajmain2022-06-25
| | | | | | | | | | | | | Problem: Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!". With shell set to cmd, it works. Solution: PowerShell doesn't use "<" for stdin redirection. Instead, use "-RedirectStandardInput". Closes #15913
* fix(filetype.lua): always return a string in getlines function (#19080)Hazel Weakly2022-06-24
| | | | This re-introduces the fix that the filetype.lua refactor inadvertently reverted. The fix ensures that in the case when end_lnum is omitted, a string is always returned.
* vim-patch:a57b553b4328 (#19076)Christian Clason2022-06-24
| | | | Update runtime files https://github.com/vim/vim/commit/a57b553b432855667c9f26edfad95ccfdd24a6b7
* vim-patch:8cc5b559f700 (#19066)Christian Clason2022-06-23
| | | | Update runtime files https://github.com/vim/vim/commit/8cc5b559f70041361612b8a6a87922503b33baa6
* refactor(runtime): refactor filetype.lua (#18813)Jonas Strittmatter2022-06-21
| | | | Move some filetype detection functions to detect.lua, sort patterns by detected filetype.
* docs(deprecated): alternatives for $NVIM_LISTEN_ADDRESSeyalk112022-06-21
|
* Merge pull request #18743 from gpanders/bowooptvalueGregory Anders2022-06-20
|\ | | | | Add "buf" and "win" to nvim_get_option_value and use them in vim.bo and vim.wo
| * refactor: use nvim_{get,set}_option_value for vim.{b,w}oGregory Anders2022-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `nvim_get_option_value` and `nvim_set_option_value` better handle unsetting local options. For instance, this is currently not possible: vim.bo.tagfunc = nil This does not work because 'tagfunc' is marked as "local to buffer" and does not have a fallback global option. However, using :setlocal *does* work as expected :setlocal tagfunc= `nvim_set_option_value` behaves more like :set and :setlocal (by design), so using these as the underlying API functions beneath vim.bo and vim.wo makes those two tables act more like :setlocal. Note that vim.o *already* uses `nvim_set_option_value` under the hood, so that vim.o behaves like :set.
| * feat(api): add "buf" and "win" to nvim_get_option_valueGregory Anders2022-06-20
| | | | | | | | These mirror their counterparts in nvim_set_option_value.
* | vim-patch:d799daa660b8 (#19031)Christian Clason2022-06-20
| | | | | | | | Update runtime files https://github.com/vim/vim/commit/d799daa660b8821943cbe1682f00da9e812dd48c
* | refactor(provider): use list comprehension #19027Zaz Brown2022-06-20
|/ | | | - list(filter(lambda x: x != "", sys.path)) + [p for p in sys.path if p != ""]
* vim-patch:8.2.5116: "limit" option of matchfuzzy() not always respected (#19005)zeertzjq2022-06-18
| | | | | Problem: "limit" option of matchfuzzy() not always respected. Solution: Remove "else". (Kazuyuki Miyagi, closes vim/vim#10586) https://github.com/vim/vim/commit/47f1a55849a73cefe738a246798221e45448546a
* vim-patch:d592deb33652 (#19002)Christian Clason2022-06-17
| | | | Update runtime files https://github.com/vim/vim/commit/d592deb336523a5448779ee3d4bba80334cff1f7
* docs: improve 'insertmode' emulation #18962zeertzjq2022-06-16
| | | | | | The current emulation script enters Insert mode much too frequently. Using only BufWinEnter seems to be a closer simulation. Also add a few more mappings.
* Merge #8519 feat: name, test ids, sockets in stdpath(state)Justin M. Keyes2022-06-17
|\
| * feat(server): instance "name", store pipes in stdpath(state)Justin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
* | fix(treesitter): new iter if foldedkevinhwang912022-06-16
| |
* | vim-patch:8.2.5110: icon filetype not recognized from the first line (#18987)Christian Clason2022-06-16
| | | | | | | | | | Problem: Icon filetype not recognized from the first line. Solution: Add a check for the first line. (Doug Kearns) https://github.com/vim/vim/commit/bf6614643f656d38d220c04befdcb1d35774853a
* | fix(lua): highlight.on_yank can close timer in twice #18976notomo2022-06-15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Steps to reproduce: 1. setting `vim.highlight.on_yank` ``` vim.api.nvim_create_autocmd({ "TextYankPost" }, { pattern = { "*" }, callback = function() vim.highlight.on_yank({ timeout = 200 }) end, }) ``` 2. repeat typing `yeye` ... 3. causes the following error. ``` Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x01e96970 is already closing stack traceback: [C]: in function 'close' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0> ``` 📝 Test result before fix: [----------] Global test environment setup. [----------] Running tests from test/functional/lua/highlight_spec.lua [ RUN ] vim.highlight.on_yank does not show errors even if buffer is wiped before timeout: 15.07 ms OK [ RUN ] vim.highlight.on_yank does not show errors even if executed between timeout and clearing highlight: 15.07 ms ERR test/helpers.lua:73: Expected objects to be the same. Passed in: (string) 'Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x02025260 is already closing stack traceback: [C]: in function 'close' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>' Expected: (string) ''
* vim-patch:8c1b8cb2e0b5 (#18966)Christian Clason2022-06-15
| | | | Update runtime files https://github.com/vim/vim/commit/8c1b8cb2e0b52d0853f85c2096a2f22dbc57a788
* docs: fix typos (#18866)dundargoc2022-06-15
| | | | | | | docs: fix typos and similarly insignificant changes Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: kanreki <32443233+kanreki@users.noreply.github.com>
* vim-patch:6ba83ba9ee29 (#18948)Christian Clason2022-06-14
| | | | Update runtime files. https://github.com/vim/vim/commit/6ba83ba9ee292f68aa0b218b3eef42db31c0b632
* feat(lsp): sort codelens if multiple item per line (#18951)rhcher2022-06-13
|
* feat: cmdheight=0 #16251Shougo2022-06-13
| | | | | | | | | Fix https://github.com/neovim/neovim/issues/1004 Limitation: All outputs need hit-enter prompt. Related: https://github.com/neovim/neovim/pull/6732 https://github.com/neovim/neovim/pull/4382
* refactor(api): update vimdocbfredl2022-06-12
|
* vim-patch:partial:63f32603789d (#18916)Christian Clason2022-06-10
| | | | | | | Update runtime files https://github.com/vim/vim/commit/63f32603789d1a27c559fc440325955fd0b8b500 skip translations skip user manual rewrite
* feat(filetype): remove side effects from vim.filetype.match (#18894)Gregory Anders2022-06-09
| | | | | | | | Many filetypes from filetype.vim set buffer-local variables, meaning vim.filetype.match cannot be used without side effects. Instead of setting these buffer-local variables in the filetype detection functions themselves, have vim.filetype.match return an optional function value that, when called, sets these variables. This allows vim.filetype.match to work without side effects.
* vim-patch:8.2.5066: lcs-leadmultispacezeertzjq2022-06-09
| | | | https://github.com/vim/vim/commit/aca12fd89b082dd9cc12ae085a84f1805747bbdf
* feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | add a new `callback` field to `nvim_get_autocmds`
* fix(diagnostic): check for negative column value (#18868)mohsen2022-06-08
|
* fix(eval/f_getmatches): return empty list for invalid win argument (#18893)Sean Dewar2022-06-07
| | | | | Slight inaccuracy in v8.1.1084's port. Like Vim, it should return [], not 0. Ref #18890
* vim-patch:partial:016188fd8a30 (#18890)Christian Clason2022-06-07
| | | | | | | Update runtime files. https://github.com/vim/vim/commit/016188fd8a30cfbaca3faa0daea9a47138dc5c4b omit changes from doc/builtin.txt (needs 8.2.1536, 8.2.4981) skip user manual rewrite for Vim9script
* refactor(runtime): port remaining patterns from filetype.vim to filetype.lua ↵Jonas Strittmatter2022-06-06
| | | | (#18814)
* docs: documenting struct members inline #18783Javier Lopez2022-06-06
| | | | | | | | Without the proper comments, doxygen doesn't understand the comment belongs to the struct member: https://www.doxygen.nl/manual/docblocks.html#memberdoc [skip ci]
* fix(lsp): fix multi client handling in code action (#18869)Mathias Fußenegger2022-06-05
| | | Fixes https://github.com/neovim/neovim/issues/18860
* Merge pull request #18864 from bfredl/optcutbfredl2022-06-05
|\ | | | | perf(tests): don't invoke nvim_get_all_options_info until needed
| * perf(tests): don't invoke nvim_get_all_options_info until neededbfredl2022-06-05
| | | | | | | | | | This call alone is responible of 40 000 000 out of 80 000 000 individual alloc/free calls in the test suite.