Merge branch 'main' into languages/dockerfile

This commit is contained in:
Poseidon 2026-01-30 14:32:08 -06:00 committed by GitHub
commit 2dbfe815eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 324 additions and 33 deletions

View file

@ -17,6 +17,7 @@ configuring/custom-package.md
configuring/custom-plugins.md
configuring/overriding-plugins.md
configuring/languages.md
configuring/keybinds.md
configuring/dags.md
configuring/dag-entries.md
configuring/autocmds.md

View file

@ -0,0 +1,38 @@
# Custom keymaps {#ch-keymaps}
Some plugin modules provide keymap options for your convenience. If a keymap is
not provided by such module options, you may easily register your own custom
keymaps via {option}`vim.keymaps`.
```nix
{
config.vim.keymaps = [
{
key = "<leader>m";
mode = "n";
silent = true;
action = ":make<CR>";
}
{
key = "<leader>l";
mode = ["n" "x"];
silent = true;
action = "<cmd>cnext<CR>";
}
{
key = "<leader>k";
mode = ["n" "x"];
# While `lua` is `true`, `action` is expected to be
# a valid Lua expression.
lua = true;
action = ''
function()
require('foo').do_thing()
print('did thing')
end
'';
}
];
}
```

View file

@ -21,3 +21,43 @@ vim.languages.java = {
};
}
```
## Custom LSP Servers {#ch-custom-lsp-servers}
Neovim 0.11, in an effort to improve the out-of-the-box experience of Neovim,
has introduced a new `vim.lsp` API that can be used to register custom LSP
servers with ease. In **nvf**, this translates to the custom `vim.lsp` API that
can be used to register servers that are not present in existing language
modules.
The {option}`vim.lsp.servers` submodule can be used to modify existing LSP
definitions OR register your own custom LSPs respectively. For example, if you'd
like to avoid having NVF pull the LSP packages you may modify the start command
to use a string, which will cause the LSP API to discover LSP servers from
{env}`PATH`. For example:
```nix
{lib, ...}: {
vim.lsp.servers = {
# Get `basedpyright-langserver` from PATH, e.g., a dev shell.
basedpyright.cmd = lib.mkForce ["basedpyright-langserver" "--stdio"];
# Define a custom LSP entry using `vim.lsp.servers`:
ty = {
cmd = lib.mkDefault [(lib.getExe pkgs.ty) "server"];
filetypes = ["python"];
root_markers = [
".git"
"pyproject.toml"
"setup.cfg"
"requirements.txt"
"Pipfile"
"pyrightconfig.json"
];
# If your LSP accepts custom settings. See `:help lsp-config` for more details
# on available fields. This is a freeform field.
settings.ty = { /* ... */ };
};
}
```

View file

@ -14,11 +14,12 @@ vim.pluginOverrides = {
rev = "";
hash = "";
};
# It's also possible to use a flake input
lazydev-nvim = inputs.lazydev-nvim;
# Or a local path
lazydev-nvim = ./lazydev;
# Or a npins pin... etc
# Or a npins pin nvfetcher source, etc.
};
```

View file

@ -132,24 +132,51 @@
- Added [sqruff](https://github.com/quarylabs/sqruff) support to `languages.sql`
- Added [Pyrefly](https://pyrefly.org/) support to `languages.python`
- Lazy-load `crates.nvim` plugin when using
`vim.languages.rust.extensions.crates-nvim.enable`
- Added [Pyrefly](https://pyrefly.org/) and [zuban](https://zubanls.com/)
support to `languages.python`
- Added TOML support via {option}`languages.toml` and the
[Tombi](https://tombi-toml.github.io/tombi/) language server, linter, and
formatter.
- Added Jinja support via `languages.jinja`
- Added [hlargs.nvim](https://github.com/m-demare/hlargs.nvim) support as
`visuals.hlargs-nvim`.
- Lazy-load `nvim-autopairs` plugin when using
`vim.autopairs.nvim-autopairs.enable`
[Machshev](https://github.com/machshev):
- Added `ruff` and `ty` LSP support for Python under `programs.python`.
[Poseidon](https://github.com/poseidon-rises):
[Snoweuph](https://github.com/snoweuph)
- Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in
`languages.lua`.
- Added XML syntax highlighting, LSP support and formatting
- Added [tera](https://keats.github.io/tera/) language support (syntax
highlighting only).
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
https://github.com/gorbit99/codewindow.nvim
- Add [codewindow.nvim] plugin in `vim.assistant.codewindow` with `enable` and
`setupOpts`
[Poseidon](https://github.com/poseidon-rises):
[docker-language-server]: https://github.com/docker/docker-language-server
[dockerfmt]: https://github.com/reteps/dockerfmt
[hadolint]: https://github.com/hadolint/hadolint
- Add dockerfile support using [docker-language-server], [dockerfmt], and
[hadolint].
<!-- vim: set textwidth=80: -->