aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* docs: typo fixes (#17859)dundargoc2022-04-15
| | | | | | | | | | Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com> Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: rwxd <rwxd@pm.me> Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
* fix(vim-patch.sh): fix N/A files patterns (#18073)zeertzjq2022-04-11
|
* ci: add script to bump versions (#17884)Abraham Francis2022-04-07
| | | | | * ci: add script for bumping dependencies * docs: add usage information for bump-deps.sh
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* docs: remove extra whitespacesDaiki Mizukami2022-03-14
|
* chore(gen_vimdoc): fall back to `brief_desc_node` when `desc_node` is emptyDaiki Mizukami2022-03-14
|
* refactor(gen_vimdoc): simplify `files` in `CONFIG`Daiki Mizukami2022-03-14
|
* chore(gen_vimdoc): call `delete_lines_below` only if the file existsDaiki Mizukami2022-03-14
| | | | | | | Previously, `delete_lines_below` would raise `FileNotFoundError` when adding a new file to `CONFIG` and you had to manually write a file with help tag of the first section as placeholder. This change relieves you of that need.
* refactor(gen_vimdoc): detect `section_start_token` automaticallyDaiki Mizukami2022-03-14
|
* chore(stripdecls): remove unused and no longer functional scriptDundar Göc2022-03-09
|
* docs(lua): reference runtime/lua/vim/_editor.luazeertzjq2022-03-06
|
* feat(vim-patch.sh): support additional args for -szeertzjq2022-03-05
| | | | This allows creating a draft vim-patch PR.
* feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
|
* ci(commitlint): allow first non-space character to be a quoteDundar Göc2022-02-11
|
* chore(vim-patch.sh): use piping instead of here string for `while read`zeertzjq2022-02-08
| | | | | | | Using a here string can cause an error if there are no missing patches: `./scripts/vim-patch.sh: line 580: runtime_commits: bad array subscript` Using piping doesn't cause the error.
* chore(gen_vimdoc): correct minimum python versionDundar Göc2022-02-05
|
* chore(gen_vimdoc): remove duplicate extmark.c entryDundar Göc2022-02-03
|
* feat(lua): add vim.keymapshadmansaleh2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | This introduces two new functions `vim.keymap.set` & `vim.keymap.del` differences compared to regular set_keymap: - remap is used as opposite of noremap. By default it's true for <Plug> keymaps and false for others. - rhs can be lua function. - mode can be a list of modes. - replace_keycodes option for lua function expr maps. (Default: true) - handles buffer specific keymaps Examples: ```lua vim.keymap.set('n', 'asdf', function() print("real lua function") end) vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, {buffer=true}) vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", {silent = true, buffer = 5 }) vim.keymap.set('i', '<Tab>', function() return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>" end, {expr = true}) vim.keymap.set('n', '[%', '<Plug>(MatchitNormalMultiBackward)') vim.keymap.del('n', 'asdf') vim.keymap.del({'n', 'i', 'v'}, '<leader>w', {buffer = 5 }) ```
* feat: filetype.lua (#16600)Gregory Anders2022-01-04
| | | | Adds a new vim.filetype module that provides support for filetype detection in Lua.
* ci: fix shellcheck errors introduced in version 0.8.0Dundar Göc2022-01-03
| | | | | | | Solved following shellcheck warnings: SC2030 SC2295 SC2015
* ci: remove unused "squash typo" workflowDundar Göc2021-12-20
|
* chore: fix typos (#16361)dundargoc2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
* fix(docgen): add tagfunc.luaMichael Lingelbach2021-11-18
|
* fix(docs): add sync.lua to gen_vimdoc (#16285)Michael Lingelbach2021-11-11
|
* fix(vim-patch.sh): run nvim with -u NONE -n #16179Sean Dewar2021-10-30
| | | | | | | | | | Problem: Because of -u NORC, vim-patch.sh would hang on my machine due to one of my plugins (start package) waiting for prompt input. Solution: - Use -u NONE instead to disable all plugins. - Also use -n to disable swapfiles. These changes only apply to the --headless nvim instances used to process things.
* refactor(api): break out Vim script functions to its own fileBjörn Linse2021-10-29
|
* ci: add newly added api file extmark.c to gen-vimdoc (#16158)dundargoc2021-10-27
|
* fix(gen_vimdoc.py): spacing around inline elements #16092Gregory Anders2021-10-19
| | | | | The spacing fix drew attention to a couple of places that were using incorrect formatting such as the key listing for `nvim_open_win`, so those were fixed too.
* ci: allow older git versions when using lintcommitDundar Göc2021-10-14
| | | | | More specifically, use "git rev-parse --abbrev-ref HEAD" instead of "git branch --show-current" to get current branch.
* ci(squash_typos.py): credit authors #15967dundargoc2021-10-08
|
* fix(docs): add win_config.cJustin M. Keyes2021-10-05
|
* ci: exclude lua-cjson from PVS report #15859dundargoc2021-10-05
|
* fix(release.sh): ignore failed "rm"Justin M. Keyes2021-10-02
|
* feat(vim-patch.sh): better detection of remote name #15846zeertzjq2021-10-02
|
* feat(ui): add vim.ui.select and use in code actions (#15771)Mathias Fußenegger2021-09-27
| | | | | | | | | | | | | Continuation of https://github.com/neovim/neovim/pull/15202 A plugin like telescope could override it with a fancy implementation and then users would get the telescope-ui within each plugin that utilizes the vim.ui.select function. There are some plugins which override the `textDocument/codeAction` handler solely to provide a different UI. With custom client commands and soon codeAction resolve support, it becomes more difficult to implement the handler right - so having a dedicated way to override the picking function will be useful.
* chore: remove unused script finddeclarations.pl #15814dundargoc2021-09-27
|
* ci(lintcommit.lua): replace third-party commitlint #15747dundargoc2021-09-26
|
* fix(pvs): Exclude xdiff from analysisJustin M. Keyes2021-09-24
| | | | | ref 088161a9459a ref fbe88ef8f5a4
* fix(PVS): disable "typo" warnings V1051, V1074Justin M. Keyes2021-09-24
| | | | | | | | | | | | | | | | | | | PVS is worried about typos. Now we need it to stop worrying... Disable these checks entirely, they are all false positives. tui.c:1873 V1074 Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos. tui.c:1983 V1074 Boundary between escape sequence and string is unclear. The escape sequence ends with a letter and the next character is also a letter. Check for typos. regexp_nfa.c:6189 V1051 Consider checking for misprints. It's possible that the 'pim->result' should be checked here. screen.c:2928 V1051 Consider checking for misprints. It's possible that the 'vcol_sbr' should be checked here. screen.c:3187 V1051 Consider checking for misprints. It's possible that the 'line_attr' should be checked here. screen.c:3267 V1051 Consider checking for misprints. It's possible that the 'multi_attr' should be checked here. screen.c:4747 V1051 Consider checking for misprints. It's possible that the 'redraw_next' should be checked here. syntax.c:3448 V1051 Consider checking for misprints. It's possible that the 'arg_end' should be checked here. syntax.c:3625 V1051 Consider checking for misprints. It's possible that the 'arg_end' should be checked here. tui.c:1836 V1051 Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here. tui.c:1863 V1051 Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here. tui.c:1882 V1051 Consider checking for misprints. It's possible that the 'data->unibi_ext.set_cursor_style' should be checked here.
* build(lint): check scripts/*.luaJustin M. Keyes2021-09-19
|
* build(lint): commit linter #15725Justin M. Keyes2021-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | Example test failure: $ nvim -es +"lua require('scripts.lintcommit')._test()" [ FAIL ]: expected=true, got=false input: ":no type before colon 1" [ FAIL ]: expected=true, got=false input: "ci: tab after colon" Example main({trace=true}) output: $ nvim -es +"lua require('scripts.lintcommit').main()" run: { "git", "branch", "--show-current" } run: { "git", "merge-base", "origin/master", "master" } run: { "git", "merge-base", "upstream/master", "master" } run: { "git", "rev-list", "89db07556dbdce97c0c150ed7e47d80e1ddacad3..master" } run: { "git", "show", "-s", "--format=%s", "d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc" } Invalid commit message: "buildlint): commit linter #15620" Commit: d2e6d2f5fc93b6da3c6153229135ba2f0b24f8cc Invalid commit type "buildlint)". Allowed types are: { "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "test", "chore", "vim-patch" } See also: https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md#commit-messages https://www.conventionalcommits.org/en/v1.0.0/
* build(lint): commit linter #15620Justin M. Keyes2021-09-19
|
* build(lint): commit linter #15620dundargoc2021-09-19
|
* Merge #15585 refactor: move vim.lsp.diagnostic to vim.diagnosticJustin M. Keyes2021-09-16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Overview - Move vim.lsp.diagnostic to vim.diagnostic - Refactor client ids to diagnostic namespaces - Update tests - Write/update documentation and function signatures Currently, non-LSP diagnostics in Neovim must hook into the LSP subsystem. This is what e.g. null-ls and nvim-lint do. This is necessary because none of the diagnostic API is exposed separately from the LSP subsystem. This commit addresses this by generalizing the diagnostic subsystem beyond the scope of LSP. The `vim.lsp.diagnostic` module is now simply a specific diagnostic producer and primarily maintains the interface between LSP clients and the broader diagnostic API. The current diagnostic API uses "client ids" which only makes sense in the context of LSP. We replace "client ids" with standard API namespaces generated from `nvim_create_namespace`. This PR is *mostly* backward compatible (so long as plugins are only using the publicly documented API): LSP diagnostics will continue to work as usual, as will pseudo-LSP clients like null-ls and nvim-lint. However, the latter can now use the new interface, which looks something like this: ```lua -- The namespace *must* be given a name. Anonymous namespaces will not work with diagnostics local ns = vim.api.nvim_create_namespace("foo") -- Generate diagnostics local diagnostics = generate_diagnostics() -- Set diagnostics for the current buffer vim.diagnostic.set(ns, diagnostics, bufnr) ``` Some public facing API utility methods were removed and internalized directly in `vim.diagnostic`: * `vim.lsp.util.diagnostics_to_items` ## API Design `vim.diagnostic` contains most of the same API as `vim.lsp.diagnostic` with `client_id` simply replaced with `namespace`, with some differences: * Generally speaking, functions that modify or add diagnostics require a namespace as their first argument, e.g. ```lua vim.diagnostic.set({namespace}, {bufnr}, {diagnostics}[, {opts}]) ``` while functions that read or query diagnostics do not (although in many cases one may be supplied optionally): ```lua vim.diagnostic.get({bufnr}[, {namespace}]) ``` * We use our own severity levels to decouple `vim.diagnostic` from LSP. These are designed similarly to `vim.log.levels` and currently include: ```lua vim.diagnostic.severity.ERROR vim.diagnostic.severity.WARN vim.diagnostic.severity.INFO vim.diagnostic.severity.HINT ``` In practice, these match the LSP diagnostic severity levels exactly, but we should treat this as an interface and not assume that they are the same. The "translation" between the two severity types is handled transparently in `vim.lsp.diagnostic`. * The actual "diagnostic" data structure is: (**EDIT:** Updated 2021-09-09): ```lua { lnum = <number>, col = <number>, end_lnum = <number>, end_col = <number>, severity = <vim.diagnostic.severity>, message = <string> } ``` This differs from the LSP definition of a diagnostic, so we transform them in the handler functions in vim.lsp.diagnostic. ## Configuration The `vim.lsp.with` paradigm still works for configuring how LSP diagnostics are displayed, but this is a specific use-case for the `publishDiagnostics` handler. Configuration with `vim.diagnostic` is instead done with the `vim.diagnostic.config` function: ```lua vim.diagnostic.config({ virtual_text = true, signs = false, underline = true, update_in_insert = true, severity_sort = false, }[, namespace]) ``` (or alternatively passed directly to `set()` or `show()`.) When the `namespace` argument is `nil`, settings are set globally (i.e. for *all* diagnostic namespaces). This is what user's will typically use for their local configuration. Diagnostic producers can also set configuration options for their specific namespace, although this is generally discouraged in order to respect the user's global settings. All of the values in the table passed to `vim.diagnostic.config()` are resolved in the same way that they are in `on_publish_diagnostics`; that is, the value can be a boolean, a table, or a function: ```lua vim.diagnostic.config({ virtual_text = function(namespace, bufnr) -- Only enable virtual text in buffer 3 return bufnr == 3 end, }) ``` ## Misc Notes * `vim.diagnostic` currently depends on `vim.lsp.util` for floating window previews. I think this is okay for now, although ideally we'd want to decouple these completely.
| * refactor: move vim.lsp.diagnostic to vim.diagnosticGregory Anders2021-09-15
| | | | | | | | | | | | | | | | | | | | | | This generalizes diagnostic handling outside of just the scope of LSP. LSP clients are now a specific case of a diagnostic producer, but the diagnostic subsystem is decoupled from the LSP subsystem (or will be, eventually). More discussion at [1]. [1]: https://github.com/neovim/neovim/pull/15585
* | fix(docs): ignore _*.lua files from auto doc generation #15678Gregory Anders2021-09-16
|/
* chore(vim-patch): add doc/vim9.txt to unwanted filesChristian Clason2021-09-10
|
* docs(gen_vimdoc.py): ignore health.lua files #15614Gregory Anders2021-09-09
|
* ci: ensure all PRs are up to date with master before attempting squashDundar Göc2021-08-15
| | | | This is to ensure unrelated authors don't get credited.
* Merge pull request #15367 from jamessan/release-fixesJames McCoy2021-08-14
|\ | | | | Clean up release handling