aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* Merge pull request #16969 from shadmansaleh/enhance/ingore_nore_on_plug_keymapsbfredl2022-02-27
|\ | | | | feat: ignore nore on <Plug> maps
| * chore: remove <Plug> detection from vim.keymapshadmansaleh2022-02-27
| |
* | refactor(lua): cleanup and docs for threadsbfredl2022-02-26
| |
* | feat(lua): add proper support of luv threadserw72022-02-26
|/
* vim-patch:8.2.4464: Dtrace files are recognized as filetype D (#17518)Christian Clason2022-02-26
| | | | | | 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. https://github.com/vim/vim/commit/4d56b971cbae01cc454eb09713326224993e38ed
* refactor(highlight)!: optional arguments for highlight.range as table (#17462)Christian Clason2022-02-21
| | | | | | | | | 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>
* fix(diagnostic): use botright copen for qflist (#17475)Michael Lingelbach2022-02-20
| | | | This matches the LSP handlers, and forces the qflist for diagnostics to span across the horizontal space, below all open windows.
* fix(lsp): use botright copen for all handlers (#17471)Michael Lingelbach2022-02-20
|
* vim-patch:8.2.4424: ".gts" and ".gjs" files are not recognized (#17464)Christian Clason2022-02-19
| | | | | | Problem: ".gts" and ".gjs" files are not recognized. Solution: Recognize Glimmer flavored typescript and javascript. (closes vim/vim#9799) https://github.com/vim/vim/commit/cdf717283ca70b18f20b8a2cefe7957083280c6f
* fix: lsp and diagnostic highlight priority (#17461)Michael Lingelbach2022-02-19
| | | | | | | | | 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.
* vim-patch:8.2.4414: solidity files are not recognized (#17451)Christian Clason2022-02-18
| | | | | Problem: Solidity files are not recognized. Solution: Add the *.sol pattern. (Dundar Goc, closes vim/vim#9792) https://github.com/vim/vim/commit/97b231541d4e82fbc85e51121448d95bd43c50ad
* vim-patch:8.2.4411: bicep files are not recognized (#17447)Christian Clason2022-02-17
| | | | | Problem: Bicep files are not recognized. Solution: Match *.bicep files. (Dundar Goc, closes vim/vim#9791) https://github.com/vim/vim/commit/8e5ba693ad9377fbf4b047093624248b81eac854
* feat(tree-sitter): allow Atom-style capture fallbacks (#14196)Stephan Seitz2022-02-16
| | | | | | | | | 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
* docs: treesitter.txt - fix overflowing lines, document ↵Chinmay Dalal2022-02-13
| | | | minimum_language_version (#17286)
* vim-patch:8.2.4352: ReScript files are not recognizedChristian Clason2022-02-12
| | | | | | Problem: ReScript files are not recognized. Solution: Add the *.res and *.resi patterns. (Ananda Umamil, closes vim/vim#9752) https://github.com/vim/vim/commit/0c3cc2fec31521b0697edc406f85b7a43e979860
* Merge pull request #17365 from kevinhwang91/fix-ts-empty-linesChristian Clason2022-02-11
|\ | | | | fix(query.lua): check empty table for lines
| * fix(query.lua): check empty table for lineskevinhwang912022-02-11
| | | | | | | | The range of node may make `nvim_buf_get_lines` return an empty table.
* | fix(lsp): correct prefix when filterText is present (#17051)Lajos Koszti2022-02-11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 `.`.
* chore: fix typos (#17250)dundargoc2022-02-08
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dani Dickstein <daniel.dickstein@gmail.com> Co-authored-by: Axel Dahlberg <git@valleymnt.com>
* vim-patch:8.2.4274: Basic and form filetype detection is incomplete (#17259)Christian Clason2022-02-01
| | | | | Problem: Basic and form filetype detection is incomplete. Solution: Add a separate function for .frm files. (Doug Kearns, closes vim/vim#9675) https://github.com/vim/vim/commit/c570e9cf68c0fe30366e82c96be460047dd659b9
* vim-patch:c4573eb12dba (#17258)Christian Clason2022-01-31
| | | | Update runtime files https://github.com/vim/vim/commit/c4573eb12dba6a062af28ee0b8938d1521934ce4
* docs: add example to vim.ui.select (#17241)dundargoc2022-01-30
| | | Closes https://github.com/neovim/neovim/issues/17137
* feat(filetype): convert patterns for mail buffers (#17238)Gregory Anders2022-01-29
|
* vim-patch:8.2.4251: vala files are not recognized (#17235)Christian Clason2022-01-29
| | | | | Problem: Vala files are not recognized. Solution: Add the *.vala pattern. (closes vim/vim#9654) https://github.com/vim/vim/commit/97c554d5149c2aa4a43d689c59563e77277265d4
* vim-patch:8.2.4238: *.tf file could be fileytpe "tf" or "terraform"Christian Clason2022-01-28
| | | | | | Problem: *.tf file could be fileytpe "tf" or "terraform". Solution: Detect the type from the file contents. (closes vim/vim#9642) https://github.com/vim/vim/commit/bd8168c7705e315827642f2976ec59e26b7fe009
* feat(ts): expose minimum language version to lua (#17186)Thomas Vigouroux2022-01-27
|
* fix(ts): escape lang when loading parsers (#16668)Lewis Russell2022-01-27
| | | | | | | | | | | When trying to load a language parser, escape the value of the language. With language injection, the language might be picked up from the buffer. If this value is erroneous it can cause `nvim_get_runtime_file` to hard error. E.g., the markdown expression `~~~{` will extract '{' as a language and then try to get the parser using `parser/{*` as the pattern.
* vim-patch:8.2.4196: various file types not recognized (#17182)dundargoc2022-01-25
| | | | | Problem: Various file types not recognized. Solution: Add patterns to recognize more file types (closes vim/vim#9607) https://github.com/vim/vim/commit/428058ab3213e81531cbd7989f4267870f35d52e
* vim-patch:8.2.4188: not all gitconfig files are recognized (#17178)Christian Clason2022-01-23
| | | | | Problem: Not all gitconfig files are recognized. Solution: Add a few more patterns. (Tim Pope, closes vim/vim#9597) https://github.com/vim/vim/commit/bcfa11b7dfdfbb4d412dd843a6da3fce68ba2e39
* vim-patch:8.2.4191: json5 files are not recognized (#17180)dundargoc2022-01-23
| | | | | Problem: json5 files are not recognized. Solution: Add a pattern for json5 files. (closes vim/vim#9601) https://github.com/vim/vim/commit/e15ebeffb35da4bb7d9054358671735ce6988c28
* vim-patch:8.2.4187: gnuplot file not recognized (#17177)Christian Clason2022-01-23
| | | | | Problem: Gnuplot file not recognized. Solution: Recognize ".gnuplot". (closes vim/vim#9588) https://github.com/vim/vim/commit/ff5cbe8133c6eb5dd86b9e042f32f589627e9bf9
* vim-patch:8.2.4172: filetype detection for BASIC is not optimal (#17161)Christian Clason2022-01-21
| | | | | Problem: Filetype detection for BASIC is not optimal. Solution: Improve BASIC filetype detection. (Doug Kearns) https://github.com/vim/vim/commit/6517f14165cdebf83a07ab9d4aeeb102b4e16e92
* docs(lsp): fix on_publish_diagnostics example (#17146)xnmet2022-01-21
|
* feat(lsp): add handler for workspace/workspaceFolders (#17149)Michael Lingelbach2022-01-21
|
* perf(lsp): request only changed portions of the buffer in changetracking ↵Michael Lingelbach2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#17118) This commits introduces two performance improvements in incremental sync: * avoiding expensive lua string reallocations on each on_lines call by requesting only the changed chunk of the buffer as reported by firstline and new_lastline parameters of on_lines * re-using already allocated tables for storing the resulting lines to reduce the load on the garbage collector The majority of the performance improvement is from requesting only changed chunks of the buffer. Benchmark: The following code measures the time required to perform a buffer edit to that operates individually on each line, common to plugins such as vim-commentary. set rtp+=~/.config/nvim/plugged/nvim-lspconfig set rtp+=~/.config/nvim/plugged/vim-commentary lua require('lspconfig')['ccls'].setup({}) function! Benchmark(tries) abort let results_comment = [] let results_undo = [] for i in range(a:tries) echo printf('run %d', i+1) let begin = reltime() normal gggcG call add(results_comment, reltimefloat(reltime(begin))) let begin = reltime() silent! undo call add(results_undo, reltimefloat(reltime(begin))) redraw endfor let avg_comment = 0.0 let avg_undo = 0.0 for i in range(a:tries) echomsg printf('run %3d: comment=%fs undo=%fs', i+1, results_comment[i], results_undo[i]) let avg_comment += results_comment[i] let avg_undo += results_undo[i] endfor echomsg printf('average: comment=%fs undo=%fs', avg_comment / a:tries, avg_undo / a:tries) endfunction command! -bar Benchmark call Benchmark(10) All text changes will be recorded within a single undo operation. Both the comment operation itself and the undo operation will generate an on_lines event for each changed line. Formatter plugins using setline() have also been found to exhibit the same problem (neoformat, :RustFmt in rust.vim), as this function too generates an on_lines event for every line it changes. Using the neovim codebase as an example (commit 2ecf0a4) with neovim itself built at 2ecf0a4 with CMAKE_BUILD_TYPE=Release shows the following performance improvement: src/nvim/lua/executor.c, 1432 lines: - baseline, no optimizations: comment=0.540587s undo=0.440249s - without double-buffering optimization: comment=0.183314s undo=0.060663s - all optimizations in this commit: comment=0.174850s undo=0.052789s src/nvim/search.c, 5467 lines: - baseline, no optimizations: comment=7.420446s undo=7.656624s - without double-buffering optimization: comment=0.889048s undo=0.486026s - all optimizations in this commit: comment=0.662899s undo=0.243628s src/nvim/eval.c, 11355 lines: - baseline, no optimizations: comment=41.775695s undo=44.583374s - without double-buffering optimization: comment=3.643933s undo=2.817158s - all optimizations in this commit: comment=1.510886s undo=0.707928s Co-authored-by: Dmytro Meleshko <dmytro.meleshko@gmail.com>
* fix(lsp): avoid nil workspace/symbol query (#17107)Daniel Steinberg2022-01-15
|
* fix(lsp): fetch offset_encoding from client in references (#17104)Michael Lingelbach2022-01-15
|
* feat: use nvim_buf_set_extmark for vim.highlight (#16963)Michael Lingelbach2022-01-15
| | | | | | | | | Closes https://github.com/neovim/neovim/issues/13647 This allows customizing the priority of the highlights. * Add default priority of 50 * Use priority of 200 for highlight on yank * use priority of 40 for highlight references (LSP)
* feat(lsp): dynamically generate list title in response_to_list (#17081)Gregory Anders2022-01-14
| | | | | | | | | | | | | | | | This gives quickfix/location lists created by handlers which use 'response_to_list' (textDocument/documentSymbols and workspace/symbol by default) the ability to set a more useful list title. This commit gives lists created for documentSymbols a title of the form: Symbols in <filename> and lists for workspace/symbol a title of the form: Symbols matching '<query>' These are more informative than a standard "Language Server" list title and can help disambiguate results when users have multiple quickfix lists that they cycle through with `:colder` and `:cnewer`.
* fix(filetype): expand tildes in filetype patterns (#17091)Gregory Anders2022-01-14
| | | | | | | This allows patterns like ["~/.config/foo"] = "fooscript" to work.
* fix(lsp): always split text edits on \r, \r\n, and \n (#17087)Michael Lingelbach2022-01-14
| | | | | | | | | | Closes: https://github.com/neovim/neovim/issues/17053 Servers can return a mix of line endings per the language server protocol. See: https://microsoft.github.io/language-server-protocol/specification.html#textDocuments All should be equally treated as line endings.
* fix(filetype): fix foam pattern detectionGregory Anders2022-01-13
|
* feat(filetype.lua): fix .cc file not detectedrhcher2022-01-13
|
* feat(filetype.lua): add support for files under .gitSanchayan Maity2022-01-13
|
* feat(filetype.lua): add support for patch filesSanchayan Maity2022-01-13
|
* feat(filetype.lua): add support for tmux.conf filesGary Sentosa2022-01-13
|
* feat(filetype.lua): fix .env file not detectedGary Sentosa2022-01-13
|
* vim-patch:8.2.4077: not all Libsensors files are recognized (#17080)Christian Clason2022-01-13
| | | | | Problem: Not all Libsensors files are recognized. Solution: Add "sensors.d/*" pattern. (Doug Kearns) https://github.com/vim/vim/commit/8d9e470aa91a93da7d6bda62521aef69a79e956d
* fix(lsp): forward offset_encoding in rename handler (#17079)Michael Lingelbach2022-01-13
|
* fix(lsp): forward offset_encoding to apply_text_edits (#17075)Michael Lingelbach2022-01-13
|