aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAge
* 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
| * build: update appdata.xml version in release commitJames McCoy2021-08-13
| | | | | | | | | | | | | | | | | | | | Adding the version we just released in the "version bump" commit is useless, since that means the actual release only reports the old version. Closes #15362 [skip ci]
* | ci: comment from bot is more helpful in case of conflict (#15359)dundargoc2021-08-13
| | | | | | Also change PR title to follow conventional commits convention.
* | ci: fix typo squasher by changing trigger to "pull_request_target" (#15357)dundargoc2021-08-13
| | | | | | | | | | The "pull_request" trigger only enables read-access for forks, "pull_request_target" is required if a fork is to be a trigger. Also changed the python script to reflect this change.
* | ci: create GitHub Action that squashes all typo PRs into a single PR (#15041)dundargoc2021-08-09
| | | | | | | | The action adds all pull-request authors (and Marvim) as a co-author to the newly created PR and also links to the closed PRs.
* | chore(vim-patch.sh): replace hub with gh (#15162)zeertzjq2021-08-03
| |
* | chore: PVS/V1042 - ignore warning globally.Dundar Göc2021-07-17
| | | | | | | | | | V1042 is a warning that a file has a copyleft license, which is an irrelevant warning to open-source projects.
* | chore: add log hander to gen_vimdocMatthieu Coudron2021-07-10
|/ | | | | so it actually dumps output. Plus a description of what it does in the argparser.
* lint (#14941)dundargoc2021-07-01
| | | | | Fix SC2155 error, found by shellcheck v0.7.2. https://github.com/koalaman/shellcheck/wiki/SC2155
* Open funcs_data.mpack in binary mode. (#14944)Daniel Steinberg2021-06-30
| | | | "b" flag is required to read binary files on Windows. https://www.lua.org/pil/21.2.2.html
* fix: Remove [RFC] from PR subject in vim-patch.sh (#14917)Daniel Steinberg2021-06-28
| | | | | As of PR #10383, CONTRIBUTING.md says '[RFC] is assumed by default'. As of PR #11656, CONTRIBUTING.md says '**do not** put "RFC" in the PR title'.
* release.sh: use stdin for release commit message (#14832)Jan Edmund Lazo2021-06-16
| | | | v0.5.0 has too many commits since v0.4.0. "git commit -m" triggers "Argument list too long" error.
* feat(lsp): Add codelens supportMathias Fussenegger2021-06-14
|
* vim-patch.sh -m: Ignore changes to version.cJames McCoy2021-05-19
| | | | [skip ci]
* fix(vim-patch.sh -m): Show all commits touching a file, not just the firstJames McCoy2021-05-19
| | | | [skip ci]
* docs: Treesitter (#13260)TJ DeVries2021-05-01
| | | | | | | | | * doc & fixes: Generate treesitter docs * fixup to treesitter-core * docs(treesitter): fix docs for most functions Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* fix(pvscheck): Switch URL to pvs-studio.comJames McCoy2021-04-29
| | | | [skip ci]
* more generic shebang for lua2dox_filterMatthieu Coudron2021-03-04
| | | | previous one was not working/ or use /bin/sh
* fix: section_name must be a dict {filename:name}Matthieu Coudron2021-03-04
| | | | else it was triggering an error during regeneration of the files.
* vim-patch.sh: remove unsupported files (#13570)Jan Edmund Lazo2021-02-03
| | | Add files listed in https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim#na-not-applicable-patches.
* vim-patch:8.1.1241: Ex command info contains confusing informationJan Edmund Lazo2021-01-01
| | | | | | | | | | | | | | | | | | | | | | Problem: Ex command info contains confusing information. Solution: When using the NOTADR flag use ADDR_OTHER for the address type. Cleanup code using NOTADR. Check for errors in create_cmdidxs.vim. Adjust Makefile to see the errors. https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011 Use Lua's "assert()" to make an invalid command definition a compilation error. Misc changes: Remove 'RESTRICT' flag. Neovim does not support "restricted" mode since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca. TODO: Do not generate files before Lua assertions so that CMake always runs the generator script if the previous build has an invalid command definition.
* docs: add check_textlock attributenotomo2020-12-16
|
* Use vX.Y.Z-dev+{git-describe} for development versionsJames McCoy2020-12-06
|
* lsp: vim.lsp.diagnostic (#12655)TJ DeVries2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking Changes: - Deprecated all `vim.lsp.util.{*diagnostics*}()` functions. - Instead, all functions must be found in vim.lsp.diagnostic - For now, they issue a warning ONCE per neovim session. In a "little while" we will remove them completely. - `vim.lsp.callbacks` has moved to `vim.lsp.handlers`. - For a "little while" we will just redirect `vim.lsp.callbacks` to `vim.lsp.handlers`. However, we will remove this at some point, so it is recommended that you change all of your references to `callbacks` into `handlers`. - This also means that for functions like |vim.lsp.start_client()| and similar, keyword style arguments have moved from "callbacks" to "handlers". Once again, these are currently being forward, but will cease to be forwarded in a "little while". - Changed the highlight groups for LspDiagnostic highlight as they were inconsistently named. - For more information, see |lsp-highlight-diagnostics| - Changed the sign group names as well, to be consistent with |lsp-highlight-diagnostics| General Enhancements: - Rewrote much of the getting started help document for lsp. It also provides a much nicer configuration strategy, so as to not recommend globally overwriting builtin neovim mappings. LSP Enhancements: - Introduced the concept of |lsp-handlers| which will allow much better customization for users without having to copy & paste entire files / functions / etc. Diagnostic Enhancements: - "goto next diagnostic" |vim.lsp.diagnostic.goto_next()| - "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()| - For each of the gotos, auto open diagnostics is available as a configuration option - Configurable diagnostic handling: - See |vim.lsp.diagnostic.on_publish_diagnostics()| - Delay display until after insert mode - Configure signs - Configure virtual text - Configure underline - Set the location list with the buffers diagnostics. - See |vim.lsp.diagnostic.set_loclist()| - Better performance for getting counts and line diagnostics - They are now cached on save, to enhance lookups. - Particularly useful for checking in statusline, etc. - Actual testing :) - See ./test/functional/plugin/lsp/diagnostic_spec.lua - Added `guisp` for underline highlighting NOTE: "a little while" means enough time to feel like most plugins and plugin authors have had a chance to refactor their code to use the updated calls. Then we will remove them completely. There is no need to keep them, because we don't have any released version of neovim that exposes these APIs. I'm trying to be nice to people following HEAD :) Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
* pvs: Exclude xdiff from analysis and comment mungingJames McCoy2020-11-10
|
* Use the free PVS-Studio licenseJames McCoy2020-11-10
| | | | | As of release 7.10, PVS Studio requires a license, even for the "check me" comment based analyzing.
* bundle: move tree-sitter as a bundled depThomas Vigouroux2020-11-03
| | | | | | fixup! bundle: move tree-sitter as a bundled dep fixup! bundle: move tree-sitter as a bundled dep
* fixup! rename: user_funcs -> userfuncJan Edmund Lazo2020-11-01
|
* fixup! eval.c: factor out eval/funcs.c #11828Jan Edmund Lazo2020-11-01
|
* fixup! refactor: move session functions to ex_session.cJan Edmund Lazo2020-11-01
|
* Fix shellcheck error SC2155Jan Edmund Lazo2020-10-15
| | | | Close https://github.com/neovim/neovim/pull/11765
* scripts/vim-patch.sh: include --shortstat with -mDaniel Hahler2020-10-15
|
* Download emoji-data from UNIDATA/James McCoy2020-10-04
|
* doc: Add docs for uri functions (#12887)TJ DeVries2020-09-14
|
* vim-patch.sh: Fix PR subject with multiple patchesJames McCoy2020-09-04
|
* docs, remove 'guifontset' #11708Justin M. Keyes2020-08-31
| | | | | | | | | | | | | - remove redundant autocmd list This "grouped" list is useless, it only gets in the way when searching for event names. - intro.txt: cleanup - starting.txt: update, revisit - doc: `:help bisect` - mbyte.txt: update aliases 1656367b90bd. closes #11960 - options: remove 'guifontset'. Why: - It is complicated and is used by almost no one. - It is unlikely to be implemented by Nvim GUIs (complicated to parse, specific to Xorg...).
* gen_vimdoc: Allow to keep intermediary outputPatrice Peterson2020-08-23
|
* Add docs for most vim.lsp methodsPatrice Peterson2020-08-23
| | | | Most of the lsp.log will be addressed in a separate PR.
* script: simplify python version check (#12672)jnozsc2020-07-24
|
* doc: fix scripts and regenerate (#12506)TJ DeVries2020-07-02
| | | | | | | | | | | | | | | | | * Fix some small doc issues * doc: fixup * doc: fixup * Fix lint and rebase * Remove bad advice * Ugh, stupid mpack files... * Don't let people include these for now until they specifically want to * Prevent duplicate tag