aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
Commit message (Collapse)AuthorAge
...
| * vim-patch:9.0.1090: FHIR Shorthand files are not recognized (#21515)Christian Clason2022-12-23
| | | | | | | | | | | | | | | | | | Problem: FHIR Shorthand files are not recognized. Solution: Add a pattern to detect FSH files. (Matthew Gramigna, closes vim/vim#11738) https://github.com/vim/vim/commit/c9207d5d79310bd4628ce46d8db588fac17878a0 Co-authored-by: mgramigna <mgramigna@mitre.org>
| * Merge pull request #21402 from lewis6991/feat/fs_lsLewis Russell2022-12-22
| |\
| | * feat(fs): add opts argument to vim.fs.dir()Lewis Russell2022-12-20
| | | | | | | | | | | | Added option depth to allow recursively searching a directory tree.
| * | vim-patch:9.0.1082: some jsonc files are not recognized (#21483)kylo2522022-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Some jsonc files are not recognized. Solution: Add patterns for jsonc and move some from json to jsonc. (closes vim/vim#11711) https://github.com/vim/vim/commit/104b2ff4d0ec9248ba0b979aa3bbccb65fcad422 Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
| * | fix(lsp): token_edit.data might be null on deletion (#21462)tiagovla2022-12-19
| | |
| * | fix(diagnostic): sort diagnostics by column (#21457)tae-soo-kim2022-12-18
| | | | | | | | | Sort diagnostics by column number in quickfix list
| * | fix(diagnostic): clear stale cache on reset (#21454)Mathias Fußenegger2022-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BufWipeout autocmd is not 100% reliable and may leave stale entries in the cache. This is sort of a hack/workaround to ensure `vim.diagnostic.reset` calls don't fail if there are stale cache entries but instead clears them Fixes errors like Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: Invalid buffer id: 22 stack traceback: [C]: in function 'nvim_exec_autocmds' /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: in function 'reset'
| * | Merge pull request #21393 from folke/highlight_showChristian Clason2022-12-17
| |\ \ | | | | | | | | | | | | feat(lsp): add function to get semantic tokens at cursor feat: `vim.inspect_pos()`, `vim.show_pos()` and `:Inspect[!]`
| | * | feat: `vim.inspect_pos`, `vim.show_pos`, `:Inspect`Folke Lemaitre2022-12-17
| | | |
| | * | feat(lsp): add function to get semantic tokens at cursorChristian Clason2022-12-13
| | |/
| * | fix(lua): always return nil values in vim.tbl_get when no resultsWilliam Boman2022-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While `return` and `return nil` are for most intents and purposes identical, there are situations where they're not. For example, calculating the amount of values via the `select()` function will yield varying results: ```lua local function nothing() return end local function null() return nil end select('#', nothing()) -- 0 select('#', null()) -- 1 ``` `vim.tbl_get` currently returns both nil and no results, which makes it unreliable to use in certain situations without manually accounting for these discrepancies.
| * | fix(ts): check buffer is loaded when restoring options (#21419)Lewis Russell2022-12-14
| | | | | | | | | | | | | | | | | | | | | fix(treesitter): check buffer is loaded when restoring options Also restore spelloptions Fixes #21416
| * | vim-patch:9.0.1057: conflict between supercollider and scala filetype ↵Christian Clason2022-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detection (#21417) Problem: Conflict between supercollider and scala filetype detection. Solution: Do not check for "Class : Method", it can appear in both filetypes. (Chris Kipp, closes vim/vim#11699) https://github.com/vim/vim/commit/70ef3f546b6ef83e463e91b7e388d9c68ad58894 Co-authored-by: Chris Kipp <ckipp@pm.me>
| * | fix(treesitter): properly restore `'syntax'` (#21358)Lewis Russell2022-12-14
| |/
| * feat(lsp): highlight semantic token modifiers (#21390)Christian Clason2022-12-12
| | | | | | | | | | | | | | | | Apply semantic token modifiers as separate extmarks with corresponding highlight groups (e.g., `@readonly`). This is a low-effort PR to enable the most common use cases (applying, e.g., italics or backgrounds on top of type highlights; language-specific fallbacks like `@global.lua` are also available). This can be replaced by more complicated selector-style themes later on.
| * perf(lsp): update semantic tokens algorithm for parsing modifiers (#21383)jdrouhard2022-12-12
| | | | | | | | | | | | | | | | Instead of testing for every possible modifier type, only test bits up to the highest set in the token array. Saves many bit ops and comparisons when there are no modifiers or when the highest set bit is a lower bit than the highest possible in the legend on average. Can be further simplified when non-luaJIT gets the full bit module (see #21222)
| * fix: vim.opt_local:append ignoring global option value (#21382)Phelipe Teles2022-12-12
| | | | | | Closes https://github.com/neovim/neovim/issues/18225
| * docs #20986Justin M. Keyes2022-12-11
| | | | | | | | | | | | - https://github.com/neovim/tree-sitter-vimdoc v1.2.4 eliminates most errors in pi_netrw.txt, so we can remove that workaround from ignore_parse_error(). - improved codeblock
| * fix(lsp): ignore null responses for semanticTokens request (#21364)fsouza2022-12-10
| | | | | | | | | | | | | | | | The spec indicates that the response may be `null`, but it doesn't really say what a `null` response means. Since neovim raises an error if the response is `null`, I figured that ignoring it would be the safest bet. Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
| * fix(lsp): fix get_active_clients bufnr parameter (#21366)Mathias Fußenegger2022-12-09
| | | | | | Follow up to https://github.com/neovim/neovim/pull/21337
| * fix(lsp): correct some type annotations (#21365)Mathias Fußenegger2022-12-09
| |
| * fix(lsp): followup fixes for semantic tokens support (#21357)jdrouhard2022-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The algorithm for applying edits was slightly incorrect. It needs to preserve the original token list as the edits are applied instead of mutating it as it iterates. From the spec: Semantic token edits behave conceptually like text edits on documents: if an edit description consists of n edits all n edits are based on the same state Sm of the number array. They will move the number array from state Sm to Sm+1. 2. Schedule the semantic token engine start() call in the client._on_attach() function so that users who schedule_wrap() their config.on_attach() functions (like nvim-lspconfig does) can still disable semantic tokens by deleting the semanticTokensProvider from their server capabilities.
| * feat(lsp): initial support for semantic token highlightingJohn Drouhard2022-12-08
| | | | | | | | | | | | * credit to @smolck and @theHamsta for their contributions in laying the groundwork for this feature and for their work on some of the helper utility functions and tests
| * feat(treesitter): add 'lang' option to show_tree() (#21341)Gregory Anders2022-12-08
| | | | | | | | This is necessary for now to support filetypes that use a parser with a different name (e.g. the "terraform" filetype uses the "hcl" parser).
| * feat(treesitter): add vim.treesitter.show_tree() (#21322)Gregory Anders2022-12-08
| | | | | | | | | | | | | | Add a "show_tree" function to view a textual representation of the nodes in a language tree in a window. Moving the cursor in the window highlights the corresponding text in the source buffer, and moving the cursor in the source buffer highlights the corresponding nodes in the window.
| * refactor(lsp): remove deprecated vim.lsp.buf_get_clients calls (#21337)Raphael2022-12-08
| |
| * feat(lsp): support willSave & willSaveWaitUntil capability (#21315)Mathias Fußenegger2022-12-08
| | | | | | | | | | `willSaveWaitUntil` allows servers to respond with text edits before saving a document. That is used by some language servers to format a document or apply quick fixes like removing unused imports.
| * vim-patch:9.0.1014: zir files are not recognized (#21301)Gregory Anders2022-12-05
| | | | | | | | | | | | | | | | Problem: Zir files are not recognized. Solution: Add a pattern for Zir files. (closes vim/vim#11664) https://github.com/vim/vim/commit/25201016d5043954689a4c9f7833935294149404 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(secure): crash when hitting escape in prompt (#21283)ii142022-12-05
| | | | | | | | | | | | | | | | - use pcall when calling vim.secure.read from C - catch keyboard interrupts in vim.secure.read, rethrow other errors - selecting "view" in prompt runs :view command - simplify lua stack cleanup with lua_gettop and lua_settop Co-authored-by: ii14 <ii14@users.noreply.github.com>
| * fix(lsp): ensure open_logfile is safe for fast events (#21288)Mathias Fußenegger2022-12-04
| | | | | | Closes https://github.com/neovim/neovim/issues/21052
| * fix(lsp): call show_document with correct argsMathias Fussenegger2022-12-04
| | | | | | | | Closes https://github.com/neovim/neovim/issues/21177
| * fix(lsp): remove workspaceFolders field (#21284)Raphael2022-12-04
| |
| * fix(lsp): render <pre>{lang} code blocks and set separator default to false ↵Folke Lemaitre2022-12-03
| | | | | | | | (#21271)
| * Merge pull request #21154 from clason/vimdoc-injectionsChristian Clason2022-12-02
| |\ | | | | | | feat(help): highlighted codeblocks
| | * docs(gen): support language annotation in docstringsChristian Clason2022-12-02
| | |
| * | refactor(fs): replace vim.fn/vim.env in vim.fs (#20379)Mike2022-12-01
| |/ | | | | | | Avoid using vim.env and vim.fn in vim.fs functions so that they can be used in "fast" contexts.
| * docs: fix typos (#21196)dundargoc2022-11-29
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com>
| * refactor: rework parameter validation in vim.secure.trust() (#21223)Gregory Anders2022-11-28
| |
| * feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll12022-11-28
| | | | | | | | | | | | | | | | | | Introduce vim.secure.trust() to programmatically manage the trust database. Use this function in a new :trust ex command which can be used as a simple frontend. Resolves: https://github.com/neovim/neovim/issues/21092 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: ii14 <ii14@users.noreply.github.com>
| * vim-patch:9.0.0952: Eclipse preference files are not recognized (#21199)Christian Clason2022-11-26
| | | | | | | | | | | | | | | | | | Problem: Eclipse preference files are not recognized. Solution: Add a pattern to use "jproperties" for Eclipse preference files. (closes vim/vim#11618) https://github.com/vim/vim/commit/f3f198b6349fe252b72975701e2f17d932b19c70 Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
| * docs: fix typos (#21168)dundargoc2022-11-26
| |
| * vim-patch:9.0.0935: when using dash it may not be recognize as filetype "sh" ↵Christian Clason2022-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#21174) * vim-patch:9.0.0935: when using dash it may not be recognize as filetype "sh" Problem: When using dash it may not be recognize as filetype "sh". Solution: Add checks for "dash". (Eisuke Kawashima,closes vim/vim#11600) https://github.com/vim/vim/commit/24482fbfd599d2273c48951df7d00d62f3e66c85 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:9.0.0932: Oblivion files are not recognized (#21179)zeertzjq2022-11-25
| | | | | | | | | | | | | | | | Problem: Oblivion files are not recognized. Solution: Recognize Oblivion files and alike as "obse". (closes vim/vim#11540) https://github.com/vim/vim/commit/ecfd511e8d802068434735dda00db6b783df6922 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0942: Workflow Description Language files are not recognized ↵Christian Clason2022-11-25
| | | | | | | | | | | | | | | | | | | | | | (#21183) Problem: Workflow Description Language files are not recognized. Solution: Add a pattern for the "wdl" filetype. (Matt Dunford, closes vim/vim#11611) https://github.com/vim/vim/commit/f60bdc3417a56a1f69e001a7ec210b92d5b0f2e1 Co-authored-by: Matt Dunford <zenmatic@gmail.com>
| * docs(lua): add clarifications for fs.find() and fs.normalize() (#21132)AzerAfram2022-11-24
| | | | | | | | Co-Authored-By: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-Authored-By: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:9.0.0922: Mermaid files are not recognized (#21160)Christian Clason2022-11-22
| | | | | | | | | | | | | | | | | | Problem: Mermaid files are not recognized. Solution: Add patterns for Mermaid. (Crag MacEachern) https://github.com/vim/vim/commit/364438d1e817d1d76003695f9ab533df35f8948a Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * fix(diagnostic): correct type annotations; add Diagnostic type (#21120)Mathias Fußenegger2022-11-21
| | | | | | | | | | Some functions didn't include the `nil` case in the return type annotation. This corrects those and also adds a Diagnostic class definition for the diagnostic.get return type
| * feat(lsp): support set title in lsp relate floatwindow (#21110)Raphael2022-11-21
| |
| * feat(diagnostic): add `suffix` option to `virt_text` config (#21140)beardedsakimonkey2022-11-20
| | | | | | | | | | | | | | This introduces a `suffix` option to the `virt_text` config in `vim.diagnostic.config()`. The suffix can either be a string which is appended to the diagnostic message or a function returning such. The function receives a `diagnostic` argument, which is the diagnostic table of the last diagnostic (the one whose message is rendered as virt text).
| * feat(diagnostic): add `suffix` option to `open_float()` (#21130)beardedsakimonkey2022-11-20
| | | | | | | | | | | | | | | | | | | | | | Closes #18687 This introduces a `suffix` option to `vim.diagnostic.open_float()` (and consequently `vim.diagnostic.config()`) that appends some text to each diagnostic in the float. It accepts the same types as `prefix`. For multiline diagnostics, the suffix is only appended to the last line. By default, the suffix will render the diagnostic error code, if any.