aboutsummaryrefslogtreecommitdiff
path: root/runtime
Commit message (Collapse)AuthorAge
...
* refactor(lua): reformat with stylua 0.14.0 (#19264)Christian Clason2022-07-07
| | | | * reformat Lua runtime to make lint CI pass * reduce max line length to 100
* vim-patch:5ed11535e069 (#19256)Christian Clason2022-07-07
| | | | Update runtime files https://github.com/vim/vim/commit/5ed11535e0695163cec71033b98bb97356cf0113
* Merge pull request #19180 from zeertzjq/tui-kitty-keypadzeertzjq2022-07-07
|\ | | | | feat(tui): recognize keypad keys when using kitty keyboard protocol
| * test: add tests for keypad keys from kitty keyboard protocolzeertzjq2022-07-04
| |
* | vim-patch:8.2.0614: get ml_get error when deleting a line in 'completefunc' ↵zeertzjq2022-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | (#19244) Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan Lakshmanan) Solution: Lock the text while evaluating 'completefunc'. https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639 Fix a mistake in the porting of patch 8.1.0098. Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270. Cherry-pick test_gf.vim changes from patch 8.2.0369. Cherry-pick message change from later patches.
* | Merge pull request #19218 from smjonas/fix_ft_patternsChristian Clason2022-07-06
|\ \ | | | | | | | | | | | | fix(filetype): fix filetype patterns fix(filetype): remove call to vim.fn.resolve and pass filename to match function
| * | fix(filetype): remove call to vim.fn.resolve and pass filename to match functionsmjonas2022-07-06
| | | | | | | | | | | | | | | For example on MacOS, /etc/hostname.file is symlinked to /private/etc/hostname.file. We only care about the original file path though.
| * | fix(filetype): fix filetype patternssmjonas2022-07-06
| | |
* | | feat: add 'mousescroll' option (#12355)Jay2022-07-06
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'mousescroll' option to control how many lines to scroll by when a mouse wheel keycode is received. The mousescroll option controls both horizontal and vertical scrolling. The option is a string in the format: set mousescroll=direction:count,direction:count Where direction is either "ver" or "hor", and count is a non negative integer. If a direction is omitted, a default value is used. The default values remain unchanged, that is 3 for vertical scrolling, and 6 for horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6". Add mousescroll documentation - Add option documentation in options.txt - Add brief summary in quickref.txt Update :help scroll-mouse-wheel - Mention mousescroll option as a means of controlling scrolling. - Remove obsolete suggestion to map scroll wheel keys to <C-U> to scroll by a single line -- users should prefer the mousescroll option. - Add some information about the consequences of remapping scroll wheel keys (they lose their magic ability to affect inactive windows). Update :help vim-differences - Add brief mousescroll summary under Options Add mousescroll tests - Test option validation - Test default mousescroll value and behavior - Test fallback to default values - Test mouse vertical and horizontal scrolling in normal mode - Test mouse vertical and horizontal scrolling in insert mode
* | Merge pull request #19242 from smjonas/vim-9.0.0042Christian Clason2022-07-06
|\ \ | | | | | | vim-patch:9.0.{0041,0042}: filetype patterns
| * | vim-patch:9.0.0042: missing change for filetype detectionsmjonas2022-07-06
| | | | | | | | | | | | | | | | | | Problem: Missing change for filetype detection. Solution: Include change to detect guile from shebang line. https://github.com/vim/vim/commit/324478037923feef1eb8a771648e38ade9e5e05a
| * | vim-patch:9.0.0041: a couple of filetype patterns do not have "*" before "/etc"smjonas2022-07-06
| |/ | | | | | | | | | | Problem: A couple of filetype patterns do not have "*" before "/etc". Solution: Add the star. (Jonas Strittmatter, closes vim/vim#10662) https://github.com/vim/vim/commit/704988f0c3598c1b0cc47f3b46f1f1229312f2bc
* / vim-patch:8.0.1562: the terminal debugger can't set a breakpoint with the ↵zeertzjq2022-07-05
|/ | | | | | | | | | | mouse (#19234) Problem: The terminal debugger can't set a breakpoint with the mouse. Solution: Add popup menu entries. https://github.com/vim/vim/commit/71137fed4d77e985d49ca32c79f030512767b8ce This ports missing popup menu code to termdebug plugin. Despite the commit message, the code is copied from latest Vim. WinBar code is commented out and WinBar docs is not ported.
* refactor(runtime): port scripts.vim to lua (#18710)Jonas Strittmatter2022-07-03
|
* vim-patch:9.0.0031: <mods> of user command does not have correct verbose ↵zeertzjq2022-07-03
| | | | | | | | | value (#19215) vim-patch:9.0.0031: <mods> of user command does not have correct verbose value Problem: <mods> of user command does not have correct verbose value. Solution: Use the value from the command modifier. (closes vim/vim#10651) https://github.com/vim/vim/commit/9359e8a6d99fe2abfcbb9603339f1740d8870cc6
* feat(api): add `unsilent` to command APIszeertzjq2022-07-03
|
* vim-patch:0d878b95d8f9 (#19197)Christian Clason2022-07-02
| | | | Update runtime files https://github.com/vim/vim/commit/0d878b95d8f9ece2fdba81050f5caba224540f9c
* vim-patch:9.0.0012: signature files not detected properly (#19172)Christian Clason2022-07-01
| | | | | Problem: Signature files not detected properly. Solution: Add a function to better detect signature files. (Doug Kearns) https://github.com/vim/vim/commit/cdbfc6dbab1d63aa56af316d6b13e37939e7f7a8
* vim-patch:8.1.0695: internal error when using :popupzeertzjq2022-07-01
| | | | | | | Problem: Internal error when using :popup. Solution: When a menu only exists in Terminal mode give an error. (Naruhiko Nishino, closes vim/vim#3765) https://github.com/vim/vim/commit/f42b45d719e03218735b3c2845a74dca9c0efd60
* vim-patch:8.1.0487: no menus specifically for the terminal windowzeertzjq2022-07-01
| | | | | | | | Problem: No menus specifically for the terminal window. Solution: Add :tlmenu. (Yee Cheng Chin, closes vim/vim#3439) Add a menu test. https://github.com/vim/vim/commit/4c5d815256099b50eca2ec5bf8f9aaa67a890211 ADDR_OHTER comes from patch 8.1.1241, which has already been ported.
* vim-patch:8.0.1570: can't use :popup for a menu in the terminalzeertzjq2022-07-01
| | | | | | | Problem: Can't use :popup for a menu in the terminal. (Wei Zhang) Solution: Make :popup work in the terminal. Also fix that entries were included that don't work in the current state. https://github.com/vim/vim/commit/29a2c08d792e4458a0af8371f5341394829fce29
* fix(filetype): update call sites of vim.filetype.match (#19171)Gregory Anders2022-06-30
| | | These were not updated in #18895.
* feat(marks): restore viewport on jump #15831Javier Lopez2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Refactor Previously most functions used to "get" a mark returned a position, changed the line number and sometimes changed even the current buffer. Now functions return a {x}fmark_T making calling context aware whether the mark is in another buffer without arcane casting. A new function is provided for switching to the mark buffer and returning a flag style Enum to convey what happen in the movement. If the cursor changed, line, columns, if it changed buffer, etc. The function to get named mark was split into multiple functions. - mark_get() -> fmark_T - mark_get_global() -> xfmark_T - mark_get_local() -> fmark_T - mark_get_motion() -> fmark_T - mark_get_visual() -> fmark_T Functions that manage the changelist and jumplist were also modified to return mark types. - get_jumplist -> fmark_T - get_changelist -> fmark_T The refactor is also seen mainly on normal.c, where all the mark movement has been siphoned through one function nv_gomark, while the other functions handle getting the mark and setting their movement flags. To handle whether context marks should be left, etc. ** Mark View While doing the refactor the concept of a mark view was also implemented: The view of a mark currently implemented as the number of lines between the mark position on creation and the window topline. This allows for moving not only back to the position of a mark but having the window look similar to when the mark was defined. This is done by carrying and extra element in the fmark_T struct, which can be extended later to also restore horizontal shift. *** User space features 1. There's a new option, jumpoptions+=view enables the mark view restoring automatically when using the jumplist, changelist, alternate-file and mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark] ** Limitations - The view information is not saved in shada. - Calls to get_mark should copy the value in the pointer since we are using pos_to_mark() to wrap and provide a homogeneous interfaces. This was also a limitation in the previous state of things.
* 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.