<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/scripts, branch master</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>build(lint): check scripts/*.lua</title>
<updated>2021-09-19T23:36:08+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-19T23:35:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=736299bf22c47f120d0790f2390511f3302f74a3'/>
<id>736299bf22c47f120d0790f2390511f3302f74a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>build(lint): commit linter #15725</title>
<updated>2021-09-19T19:57:57+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-19T19:57:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6565adcbffd3b7ff2a19e8aa7b7db2cb7bfc4e2e'/>
<id>6565adcbffd3b7ff2a19e8aa7b7db2cb7bfc4e2e</id>
<content type='text'>
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/</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/</pre>
</div>
</content>
</entry>
<entry>
<title>build(lint): commit linter #15620</title>
<updated>2021-09-19T18:06:47+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-19T18:06:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2aa662568a995ccfece490ca0f0f0cbdb9d57560'/>
<id>2aa662568a995ccfece490ca0f0f0cbdb9d57560</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>build(lint): commit linter #15620</title>
<updated>2021-09-19T16:27:08+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2021-09-19T16:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=65572c719a323ad92603fc82801827841ff81a7d'/>
<id>65572c719a323ad92603fc82801827841ff81a7d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge #15585 refactor: move vim.lsp.diagnostic to vim.diagnostic</title>
<updated>2021-09-16T21:23:42+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2021-09-16T21:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2e8103475e18d1e4aa0d6355107f393815a886a6'/>
<id>2e8103475e18d1e4aa0d6355107f393815a886a6</id>
<content type='text'>
## 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 = &lt;number&gt;,
    col = &lt;number&gt;,
    end_lnum = &lt;number&gt;,
    end_col = &lt;number&gt;,
    severity = &lt;vim.diagnostic.severity&gt;,
    message = &lt;string&gt;
  }
  ```

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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
## 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 = &lt;number&gt;,
    col = &lt;number&gt;,
    end_lnum = &lt;number&gt;,
    end_col = &lt;number&gt;,
    severity = &lt;vim.diagnostic.severity&gt;,
    message = &lt;string&gt;
  }
  ```

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.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(docs): ignore _*.lua files from auto doc generation #15678</title>
<updated>2021-09-16T17:49:11+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-09-16T17:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d140d3bd33010b968908059bc49b161ed33395fe'/>
<id>d140d3bd33010b968908059bc49b161ed33395fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: move vim.lsp.diagnostic to vim.diagnostic</title>
<updated>2021-09-15T20:09:47+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-09-07T02:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a5bbb932f9094098bd656d3f6be3c58344576709'/>
<id>a5bbb932f9094098bd656d3f6be3c58344576709</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>chore(vim-patch): add doc/vim9.txt to unwanted files</title>
<updated>2021-09-10T11:20:11+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2021-09-10T11:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c58a667e57d8dd84bbbd3ba1ddafb6a603b7b37b'/>
<id>c58a667e57d8dd84bbbd3ba1ddafb6a603b7b37b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(gen_vimdoc.py): ignore health.lua files #15614</title>
<updated>2021-09-10T01:28:12+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2021-09-10T01:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=a422f2136a001921fb54e7b83b6d00e6d5f42a4a'/>
<id>a422f2136a001921fb54e7b83b6d00e6d5f42a4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ci: ensure all PRs are up to date with master before attempting squash</title>
<updated>2021-08-15T10:38:05+00:00</updated>
<author>
<name>Dundar Göc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2021-08-13T17:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=9367aee62dc9f8a3e1f1c35f9b85eea3a6bbe113'/>
<id>9367aee62dc9f8a3e1f1c35f9b85eea3a6bbe113</id>
<content type='text'>
This is to ensure unrelated authors don't get credited.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to ensure unrelated authors don't get credited.
</pre>
</div>
</content>
</entry>
</feed>
