mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-05 18:40:53 +00:00
Merge branch 'main' into notashelf/push-qozvyzsvqtmk
This commit is contained in:
commit
0f302adf64
41 changed files with 1214 additions and 506 deletions
4
.github/workflows/cachix.yml
vendored
4
.github/workflows/cachix.yml
vendored
|
|
@ -25,14 +25,14 @@ jobs:
|
|||
name: Checkout
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31.10.1
|
||||
uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
substituters = https://cache.nixos.org/ https://feel-co.cachix.org
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w=
|
||||
|
||||
- uses: cachix/cachix-action@v16
|
||||
- uses: cachix/cachix-action@v17
|
||||
with:
|
||||
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||
extraPullNames: nix-community
|
||||
|
|
|
|||
12
.github/workflows/check.yml
vendored
12
.github/workflows/check.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- uses: cachix/install-nix-action@v31.10.1
|
||||
- uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31.10.1
|
||||
uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
@ -93,14 +93,14 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- uses: cachix/install-nix-action@v31.10.1
|
||||
- uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
substituters = https://cache.nixos.org/ https://feel-co.cachix.org
|
||||
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w=
|
||||
|
||||
- uses: cachix/cachix-action@v16
|
||||
- uses: cachix/cachix-action@v17
|
||||
with:
|
||||
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||
extraPullNames: nix-community
|
||||
|
|
@ -131,7 +131,7 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- uses: cachix/install-nix-action@v31.10.1
|
||||
- uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
@ -169,7 +169,7 @@ jobs:
|
|||
cat "$HOME/changed_files"
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31.10.1
|
||||
uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
|
|||
2
.github/workflows/docs-preview.yml
vendored
2
.github/workflows/docs-preview.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: cachix/install-nix-action@v31.10.1
|
||||
- uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
|
|||
2
.github/workflows/manual.yml
vendored
2
.github/workflows/manual.yml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: cachix/install-nix-action@v31.10.1
|
||||
- uses: cachix/install-nix-action@v31.10.3
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
extra_nix_config: |
|
||||
|
|
|
|||
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
|
||||
- name: "Install Nix"
|
||||
uses: cachix/install-nix-action@v31.10.1
|
||||
uses: cachix/install-nix-action@v31.10.3
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ isMaximal: {
|
|||
logFile = "/tmp/nvim.log";
|
||||
};
|
||||
|
||||
# vim.opts and vim.options are aliased
|
||||
opts.expandtab = true;
|
||||
|
||||
spellcheck = {
|
||||
enable = true;
|
||||
programmingWordlist.enable = isMaximal;
|
||||
|
|
@ -74,8 +77,10 @@ isMaximal: {
|
|||
};
|
||||
toml.enable = isMaximal;
|
||||
xml.enable = isMaximal;
|
||||
tex.enable = isMaximal;
|
||||
|
||||
# Language modules that are not as common.
|
||||
openscad.enable = false;
|
||||
arduino.enable = false;
|
||||
assembly.enable = false;
|
||||
astro.enable = false;
|
||||
|
|
@ -100,9 +105,12 @@ isMaximal: {
|
|||
jinja.enable = false;
|
||||
tailwind.enable = false;
|
||||
svelte.enable = false;
|
||||
liquid.enable = false;
|
||||
tera.enable = false;
|
||||
twig.enable = false;
|
||||
gettext.enable = false;
|
||||
fluent.enable = false;
|
||||
jq.enable = false;
|
||||
|
||||
# Nim LSP is broken on Darwin and therefore
|
||||
# should be disabled by default. Users may still enable
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ the default theme enabled. You may use other options inside `config.vim` in
|
|||
# Can also move this to another config file if you pass your own
|
||||
# inputs/self around with specialArgs
|
||||
({pkgs, ...}: {
|
||||
environment.systemPackages = [self.packages.${pkgs.stdenv.system}.neovim];
|
||||
environment.systemPackages = [self.packages.${pkgs.stdenv.hostPlatform.system}.my-neovim];
|
||||
})
|
||||
];
|
||||
# ...
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
`vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master`
|
||||
branch to the new main branch. This change removes incremental selections, so
|
||||
it is no longer available.
|
||||
|
||||
- [obsidian.nvim] now uses a maintained fork which has removed the `dir`
|
||||
setting. Use `workspaces` instead:
|
||||
|
||||
|
|
@ -21,16 +22,22 @@
|
|||
```
|
||||
|
||||
Some other settings and commands are now deprecated but are still supported.
|
||||
|
||||
- The `setupOpts.mappings` options were also removed. Use the built-in Neovim
|
||||
settings (nvf's {option}`vim.keymaps`)
|
||||
|
||||
- `languages.{terraform,hcl}`: LSP servers now default to `tofu-ls`. While this
|
||||
is unlikely to cause any noticeable change in behavior or breakage, it's
|
||||
mentioned just in case.
|
||||
|
||||
- `vim.treesitter.foldByDefault` is removed. Folding behavior should be
|
||||
controlled via `vim.options.foldenable` directly instead. RIP
|
||||
`vim.treesitter.foldByDefault` 2026-03-19 - 2026-03-19.
|
||||
|
||||
[Snoweuph](https://github.com/snoweuph)
|
||||
|
||||
- "Correct `languages.go.treesitter` to contain all Go file types.
|
||||
`languages.go.treesitter.package` is now `languages.go.treesitter.goPackage`.
|
||||
New are:
|
||||
|
||||
- `languages.go.treesitter.goPackage`.
|
||||
|
||||
- `languages.go.treesitter.gomodPackage`.
|
||||
|
|
@ -52,6 +59,15 @@
|
|||
|
||||
## Changelog {#sec-release-0-9-changelog}
|
||||
|
||||
[midischwarz12](https://github.com/midischwarz12):
|
||||
|
||||
- Changed the prettier-plugin-astro build to use `writableTmpDirAsHomeHook` to
|
||||
avoid pnpm hook failures in sandboxed builds.
|
||||
|
||||
- Fix `vim.utility.leetcode-nvim` adding `fzf-lua` to `vim.startPlugins` when
|
||||
`vim.fzf-lua` already manages the plugin lazily, avoiding duplicate `/start`
|
||||
and `/opt` installs and the corresponding `mnw` evaluation warning.
|
||||
|
||||
[taylrfnt](https://github.com/taylrfnt)
|
||||
|
||||
- Introduce a `darwinModule` option for Darwin users. The ergonomics of
|
||||
|
|
@ -60,7 +76,7 @@
|
|||
following:
|
||||
|
||||
```shell
|
||||
(class: "nixos") cannot be imported into a module
|
||||
(class: "nixos") cannot be imported into a module
|
||||
evaluation that expects class "darwin".
|
||||
```
|
||||
|
||||
|
|
@ -78,6 +94,8 @@
|
|||
[NotAShelf](https://github.com/notashelf):
|
||||
|
||||
- Lazyload noice.nvim and nvim-web-devicons on `DeferredUIEnter`
|
||||
- Allow nulling treesitter packages for various language modules, filter `null`
|
||||
values in `vim.treesitter.grammars`.
|
||||
|
||||
[jfeo](https://github.com/jfeo):
|
||||
|
||||
|
|
@ -96,6 +114,14 @@
|
|||
|
||||
- `toggleterm` open map now also works when in terminal mode
|
||||
|
||||
[ppenguin](https://github.com/ppenguin):
|
||||
|
||||
- Improved/harmonized for `terraform` and `hcl`:
|
||||
- formatting (use `terraform fmt` or `tofu fmt` for `tf` files)
|
||||
- LSP config
|
||||
- Added `tofu` and `tofu-ls` as (free) alternative to `terrraform` and
|
||||
`terraform-ls`
|
||||
|
||||
[jtliang24](https://github.com/jtliang24):
|
||||
|
||||
- Updated nix language plugin to use pkgs.nixfmt instead of
|
||||
|
|
@ -145,7 +171,9 @@
|
|||
- Mappings are now expected to be set using the built-in Neovim APIs,
|
||||
managed by `vim.keymaps` in nvf, instead of `mappings` options.
|
||||
- Some option defaults have changed.
|
||||
|
||||
- And more.
|
||||
|
||||
- Automatically configure an enabled picker in the order mentioned above, if
|
||||
any are enabled.
|
||||
- Add integration with `snacks.image` for rendering workspace/vault assets.
|
||||
|
|
@ -201,6 +229,9 @@
|
|||
- Added [tera](https://keats.github.io/tera/) language support (syntax
|
||||
highlighting only).
|
||||
|
||||
- Added [liquid](https://keats.github.io/tera/) language support (syntax
|
||||
highlighting only) via `languages.liquid`.
|
||||
|
||||
- Added Debugging support to `languages.odin` with
|
||||
[nvim-dap-odin](https://github.com/NANDquark/nvim-dap-odin).
|
||||
|
||||
|
|
@ -222,9 +253,26 @@
|
|||
- Fix `languages.hcl` init, depending on `comment-nvim` by checking if it is
|
||||
enabled. Fixes a crash (#1350).
|
||||
|
||||
- Added [`tsgo`](https://github.com/microsoft/typescript-go) as an LSP to
|
||||
`languages.ts`.
|
||||
|
||||
- Fix `languages.ts` registration of formatters.
|
||||
|
||||
- Added `biome-check` and `biome-organize-imports` formatters to `languages.ts`.
|
||||
|
||||
- Added [`biomejs`](https://biomejs.dev/) as extra diagnostics provider to
|
||||
`languages.ts`.
|
||||
|
||||
- Add `languages.fluent` using the official plugin. This only provides
|
||||
highlighting.
|
||||
|
||||
- Add `languages.gettext`. This only provides highlighting.
|
||||
|
||||
- Add `languages.openscad` using
|
||||
[`openscad-lsp`](https://github.com/Leathong/openscad-LSP). This currently
|
||||
relies on neovim builtin syntax for highlighting, and the lsp for formatting
|
||||
and diagnostics.
|
||||
|
||||
- Added Debugging support to `languages.php`.
|
||||
|
||||
- Added Formatting support to `languages.php` via
|
||||
|
|
@ -235,10 +283,21 @@
|
|||
[twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) aren't
|
||||
packaged for nix.
|
||||
|
||||
- Added `languages.tex`. Currently only highlighting, formatting and lsp. No
|
||||
previewing yet.
|
||||
|
||||
- Added `languages.jq`. Supports highlighting, formatting and lsp.
|
||||
|
||||
- Didn't Add
|
||||
[`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim),
|
||||
you're crazy.
|
||||
|
||||
- Added neovim theme `gruber-darker`
|
||||
<https://github.com/blazkowolf/gruber-darker.nvim>.
|
||||
|
||||
- Added coverage support (`vim.utility.crazy-coverage`) via
|
||||
[`crazy-coverage.nvim`](https://github.com/mr-u0b0dy/crazy-coverage.nvim).
|
||||
|
||||
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
||||
https://github.com/gorbit99/codewindow.nvim
|
||||
|
||||
|
|
@ -294,4 +353,16 @@ https://github.com/gorbit99/codewindow.nvim
|
|||
|
||||
- Fix `vim.assistant.codecompanion-nvim` lazy loading with [blink-cmp]
|
||||
|
||||
[foobar14](https://github.com/foobar14):
|
||||
|
||||
- Fix `vim.formatter.conform-nvim.setupOpts.formatters` type for correct merging
|
||||
|
||||
[SmackleFunky](https://github.com/SmackleFunky):
|
||||
|
||||
- Updated codecompanion-nvim adapters to allow specifying a model.
|
||||
|
||||
[tlvince](https://github.com/tlvince):
|
||||
|
||||
- Added configuration option for `foldenable`
|
||||
|
||||
<!-- vim: set textwidth=80: -->
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -74,11 +74,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771008912,
|
||||
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
|
||||
"lastModified": 1774386573,
|
||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
|
||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "blink-cmp";
|
||||
version = "1.9.1";
|
||||
version = "1.10.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Saghen";
|
||||
repo = "blink.cmp";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8=";
|
||||
hash = "sha256-y8f+bmPkb3M6DzcUkJMxd2woDLoBYslne7aB8A0ejCk=";
|
||||
};
|
||||
|
||||
forceShare = [
|
||||
|
|
@ -39,18 +39,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
# From the blink.cmp flake
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [rust-jemalloc-sys];
|
||||
|
||||
# NOTE: The only change in frizbee 0.7.0 was nixpkgs incompatible rust semantic changes
|
||||
# Patch just reverts https://github.com/saghen/blink.cmp/commit/cc824ec85b789a54d05241389993c6ab8c040810
|
||||
# Taken from Nixpkgs' blink.cmp derivation, available under the MIT license
|
||||
cargoPatches = [
|
||||
./patches/0001-pin-frizbee.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";
|
||||
cargoHash = "sha256-3o2n4xwNF9Fc3VlPKf3lnvmN7FVus5jQB8gcXXwz50c=";
|
||||
|
||||
env = {
|
||||
RUSTC_BOOTSTRAP = true;
|
||||
|
||||
# Those are the Linker args used by upstream. Without those, the build fails.
|
||||
# See:
|
||||
# <https://github.com/saghen/blink.cmp/blob/main/.cargo/config.toml#L1C1-L11C2>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
pnpmConfigHook,
|
||||
fetchPnpmDeps,
|
||||
pins,
|
||||
writableTmpDirAsHomeHook,
|
||||
}: let
|
||||
pin = pins.prettier-plugin-astro;
|
||||
in
|
||||
|
|
@ -28,6 +29,7 @@ in
|
|||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
writableTmpDirAsHomeHook
|
||||
(pnpmConfigHook.overrideAttrs {
|
||||
propagatedBuildInputs = [pnpm_9];
|
||||
})
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ in
|
|||
sha256 = pin.hash;
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-D+gDdKiIG38jV+M/BqTKf0yYj1KXpbIodtQFdzocpn8=";
|
||||
npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw=";
|
||||
})
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
mkGrammarOption = pkgs: grammar:
|
||||
mkPackageOption pkgs ["${grammar} treesitter"] {
|
||||
default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar];
|
||||
nullable = true;
|
||||
};
|
||||
in {
|
||||
inherit diagnostics diagnosticSubmodule mkGrammarOption;
|
||||
|
|
|
|||
|
|
@ -342,5 +342,10 @@ in {
|
|||
Incremental selection configuration has been removed from nvim-treesitter.
|
||||
'')
|
||||
]
|
||||
|
||||
# 2026-03-19
|
||||
[
|
||||
(mkRenamedOptionModule ["vim" "treesitter" "foldByDefault"] ["vim" "options" "foldenable"])
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
# Alias vim.options as vim.opts.
|
||||
# This is a convenience for people using frameworks like flake-parts or Den that use lib.types.deferredModule
|
||||
# and users would set `vim.options` but error when Nix confuses it with Nix Module's options-definitions.
|
||||
imports = [(lib.mkAliasOptionModule ["vim" "opts"] ["vim" "options"])];
|
||||
|
||||
config.vim = {
|
||||
# Set options that were previously interpolated in 'luaConfigRC.basic' as vim.options (vim.o)
|
||||
# and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) int str enum nullOr attrs;
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) int str enum nullOr attrs either submodule;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
in {
|
||||
options.vim.assistant = {
|
||||
|
|
@ -202,9 +202,23 @@ in {
|
|||
strategies = {
|
||||
chat = {
|
||||
adapter = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Adapter used for the chat strategy.";
|
||||
type = nullOr (either str (submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Name of the Adapter";
|
||||
};
|
||||
|
||||
model = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Model used for Adapter.";
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
keymaps = mkOption {
|
||||
|
|
@ -253,9 +267,23 @@ in {
|
|||
|
||||
inline = {
|
||||
adapter = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Adapter used for the inline strategy.";
|
||||
type = nullOr (either str (submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Name of the Adapter";
|
||||
};
|
||||
|
||||
model = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Model used for Adapter.";
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
variables = mkOption {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.options) mkOption mkEnableOption literalMD;
|
||||
inherit (lib.types) attrs either nullOr listOf submodule str;
|
||||
inherit (lib.types) attrs attrsOf either nullOr listOf submodule str;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.types) luaInline mkPluginSetupOption;
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ in {
|
|||
enable = mkEnableOption "lightweight yet powerful formatter plugin for Neovim [conform-nvim]";
|
||||
setupOpts = mkPluginSetupOption "conform.nvim" {
|
||||
formatters = mkOption {
|
||||
type = formattersType;
|
||||
type = attrsOf formattersType;
|
||||
default = {};
|
||||
description = "Custom formatters and overrides for built-in formatters.";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,12 +25,14 @@ in {
|
|||
./html.nix
|
||||
./tera.nix
|
||||
./twig.nix
|
||||
./liquid.nix
|
||||
./haskell.nix
|
||||
./java.nix
|
||||
./jinja.nix
|
||||
./json.nix
|
||||
./lua.nix
|
||||
./markdown.nix
|
||||
./tex.nix
|
||||
./nim.nix
|
||||
./vala.nix
|
||||
./nix.nix
|
||||
|
|
@ -59,7 +61,10 @@ in {
|
|||
./just.nix
|
||||
./make.nix
|
||||
./xml.nix
|
||||
./gettext.nix
|
||||
./fluent.nix
|
||||
./openscad.nix
|
||||
./jq.nix
|
||||
|
||||
# This is now a hard deprecation.
|
||||
(mkRenamedOptionModule ["vim" "languages" "enableLSP"] ["vim" "lsp" "enable"])
|
||||
|
|
|
|||
35
modules/plugins/languages/gettext.nix
Normal file
35
modules/plugins/languages/gettext.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.options) mkEnableOption literalExpression;
|
||||
|
||||
cfg = config.vim.languages.gettext;
|
||||
# TODO: package `msgfmt --check` into nvim-lint
|
||||
# TODO: package `msgcat` into conform.nvim
|
||||
in {
|
||||
options.vim.languages.gettext = {
|
||||
enable = mkEnableOption "gettext portable object language support";
|
||||
|
||||
treesitter = {
|
||||
enable =
|
||||
mkEnableOption "gettext portable object language treesitter"
|
||||
// {
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
};
|
||||
package = mkGrammarOption pkgs "po";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
@ -8,20 +8,27 @@
|
|||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) bool enum listOf;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.hcl;
|
||||
|
||||
defaultServers = ["terraform-ls"];
|
||||
defaultServers = ["tofuls-hcl"];
|
||||
servers = {
|
||||
terraform-ls = {
|
||||
terraformls-hcl = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.terraform-ls) "serve"];
|
||||
filetypes = ["terraform" "terraform-vars"];
|
||||
filetypes = ["hcl"];
|
||||
root_markers = [".git"];
|
||||
};
|
||||
tofuls-hcl = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.tofu-ls) "serve"];
|
||||
filetypes = ["hcl"];
|
||||
root_markers = [".terraform" ".git"];
|
||||
};
|
||||
# TODO: package nomad-lsp and offer as an option here too
|
||||
};
|
||||
|
||||
defaultFormat = ["hclfmt"];
|
||||
|
|
@ -29,6 +36,11 @@
|
|||
hclfmt = {
|
||||
command = getExe pkgs.hclfmt;
|
||||
};
|
||||
nomad-fmt = {
|
||||
command = getExe pkgs.nomad;
|
||||
args = ["fmt" "$FILENAME"];
|
||||
stdin = false;
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.hcl = {
|
||||
|
|
@ -66,7 +78,7 @@ in {
|
|||
defaultText = literalExpression "config.vim.languages.enableFormat";
|
||||
};
|
||||
type = mkOption {
|
||||
type = deprecatedSingleOrListOf "vim.language.hcl.format.type" (enum (attrNames formats));
|
||||
type = listOf (enum (attrNames formats));
|
||||
default = defaultFormat;
|
||||
description = "HCL formatter to use";
|
||||
};
|
||||
|
|
@ -97,18 +109,21 @@ in {
|
|||
}
|
||||
'';
|
||||
}
|
||||
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
vim = {
|
||||
lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
|
|
|
|||
114
modules/plugins/languages/jq.nix
Normal file
114
modules/plugins/languages/jq.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) literalExpression mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
cfg = config.vim.languages.jq;
|
||||
|
||||
defaultServers = ["jq-lsp"];
|
||||
servers = {
|
||||
jq-lsp = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.jq-lsp)];
|
||||
filetypes = ["jq"];
|
||||
root_markers = [".git"];
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = ["jqfmt"];
|
||||
formats = {
|
||||
jqfmt = {
|
||||
command = getExe pkgs.jqfmt;
|
||||
args = [
|
||||
"-ob"
|
||||
"-ar"
|
||||
"-op=pipe"
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.jq = {
|
||||
enable = mkEnableOption "JQ support";
|
||||
|
||||
treesitter = {
|
||||
enable =
|
||||
mkEnableOption "JQ treesitter"
|
||||
// {
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
};
|
||||
package = mkGrammarOption pkgs "jq";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable =
|
||||
mkEnableOption "JQ LSP support"
|
||||
// {
|
||||
default = config.vim.lsp.enable;
|
||||
defaultText = literalExpression "config.vim.lsp.enable";
|
||||
};
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "JQ LSP server to use";
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
enable =
|
||||
mkEnableOption "JQ formatting"
|
||||
// {
|
||||
default = config.vim.languages.enableFormat;
|
||||
defaultText = literalExpression "config.vim.languages.enableFormat";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
description = "JQ formatter to use";
|
||||
type = listOf (enum (attrNames formats));
|
||||
default = defaultFormat;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter = {
|
||||
enable = true;
|
||||
grammars = [cfg.treesitter.package];
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.formatter.conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
formatters_by_ft.jq = cfg.format.type;
|
||||
formatters =
|
||||
mapListToAttrs (name: {
|
||||
inherit name;
|
||||
value = formats.${name};
|
||||
})
|
||||
cfg.format.type;
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
34
modules/plugins/languages/liquid.nix
Normal file
34
modules/plugins/languages/liquid.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption literalExpression;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
cfg = config.vim.languages.liquid;
|
||||
in {
|
||||
options.vim.languages.liquid = {
|
||||
enable = mkEnableOption "Liquid templating language support";
|
||||
|
||||
treesitter = {
|
||||
enable =
|
||||
mkEnableOption "Liquid treesitter"
|
||||
// {
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
};
|
||||
package = mkGrammarOption pkgs "liquid";
|
||||
};
|
||||
# TODO: if curlylint gets packaged for nix, add it.
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
marksman = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.marksman) "server"];
|
||||
filetypes = ["markdown" "markdown.mdx"];
|
||||
filetypes = ["markdown" "mdx"];
|
||||
root_markers = [".marksman.toml" ".git"];
|
||||
};
|
||||
|
||||
|
|
|
|||
62
modules/plugins/languages/openscad.nix
Normal file
62
modules/plugins/languages/openscad.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.openscad;
|
||||
/*
|
||||
There is no Treesitter module for OpenSCAD yet.
|
||||
Luckily vim already ships with a builtin syntax that is used by default.
|
||||
|
||||
The LSP already ships with diagnostics, but there is also an experimental analyzer called sca2d
|
||||
<https://search.nixos.org/packages?channel=unstable&query=sca2d>
|
||||
But it isn't packaged for nvim-lint and would need extra work.
|
||||
*/
|
||||
|
||||
defaultServers = ["openscad-lsp"];
|
||||
servers = {
|
||||
openscad-lsp = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.openscad-lsp) "--stdio"];
|
||||
filetypes = ["openscad"];
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.openscad = {
|
||||
enable = mkEnableOption "OpenSCAD language support";
|
||||
|
||||
lsp = {
|
||||
enable =
|
||||
mkEnableOption "OpenSCAD LSP support"
|
||||
// {
|
||||
default = config.vim.lsp.enable;
|
||||
defaultText = literalExpression "config.vim.lsp.enable";
|
||||
};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "OpenSCAD LSP server to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ in {
|
|||
type = attrs;
|
||||
default = {
|
||||
type = "executable";
|
||||
command = "${pkgs.nodePackages_latest.nodejs}/bin/node";
|
||||
command = getExe pkgs.nodejs;
|
||||
args = [
|
||||
"${pkgs.vscode-extensions.xdebug.php-debug}/share/vscode/extensions/xdebug.php-debug/out/phpDebug.js"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum package coercedTo;
|
||||
inherit (lib.types) enum coercedTo;
|
||||
inherit (lib.nvim.types) mkGrammarOption diagnostics deprecatedSingleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
prettierPluginPath = "${prettierPlugin}/lib/node_modules/prettier-plugin-svelte/plugin.js";
|
||||
in {
|
||||
prettier = {
|
||||
command = getExe pkgs.nodePackages.prettier;
|
||||
command = getExe pkgs.prettier;
|
||||
options.ft_parsers.svelte = "svelte";
|
||||
prepend_args = ["--plugin=${prettierPluginPath}"];
|
||||
};
|
||||
|
|
@ -130,7 +130,12 @@ in {
|
|||
};
|
||||
|
||||
format = {
|
||||
enable = mkEnableOption "Svelte formatting" // {default = config.vim.languages.enableFormat;};
|
||||
enable =
|
||||
mkEnableOption "Svelte formatting"
|
||||
// {
|
||||
default = config.vim.languages.enableFormat;
|
||||
defaultText = literalExpression "config.vim.languages.enableFormat";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = formatType;
|
||||
|
|
@ -140,7 +145,12 @@ in {
|
|||
};
|
||||
|
||||
extraDiagnostics = {
|
||||
enable = mkEnableOption "extra Svelte diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
|
||||
enable =
|
||||
mkEnableOption "extra Svelte diagnostics"
|
||||
// {
|
||||
default = config.vim.languages.enableExtraDiagnostics;
|
||||
defaultText = literalExpression "config.vim.languages.enableExtraDiagnostics";
|
||||
};
|
||||
|
||||
types = diagnostics {
|
||||
langDesc = "Svelte";
|
||||
|
|
|
|||
|
|
@ -9,23 +9,43 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.types) enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.terraform;
|
||||
|
||||
defaultServers = ["terraformls"];
|
||||
defaultServers = ["tofuls-tf"];
|
||||
servers = {
|
||||
terraformls = {
|
||||
terraformls-tf = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.terraform-ls) "serve"];
|
||||
filetypes = ["terraform" "terraform-vars"];
|
||||
filetypes = ["terraform" "terraform-vars" "tf"];
|
||||
root_markers = [".terraform" ".git"];
|
||||
};
|
||||
tofuls-tf = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.tofu-ls) "serve"];
|
||||
filetypes = ["terraform" "terraform-vars" "tf"];
|
||||
root_markers = [".terraform" ".git"];
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = ["tofu-fmt"];
|
||||
formats = {
|
||||
tofu-fmt = {
|
||||
command = "${getExe pkgs.opentofu}";
|
||||
args = ["fmt" "$FILENAME"];
|
||||
stdin = false;
|
||||
};
|
||||
terraform-fmt = {
|
||||
command = "${getExe pkgs.terraform}";
|
||||
args = ["fmt" "$FILENAME"];
|
||||
stdin = false;
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.terraform = {
|
||||
enable = mkEnableOption "Terraform/HCL support";
|
||||
enable = mkEnableOption "Terraform support";
|
||||
|
||||
treesitter = {
|
||||
enable =
|
||||
|
|
@ -44,14 +64,28 @@ in {
|
|||
default = config.vim.lsp.enable;
|
||||
defaultText = literalExpression "config.vim.lsp.enable";
|
||||
};
|
||||
|
||||
servers = mkOption {
|
||||
type = listOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
description = "Terraform LSP server to use";
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
enable =
|
||||
mkEnableOption "Enable Terraform formatting"
|
||||
// {
|
||||
default = config.vim.languages.enableFormat;
|
||||
defaultText = literalExpression "config.vim.languages.enableFormat";
|
||||
};
|
||||
type = mkOption {
|
||||
type = listOf (enum (attrNames formats));
|
||||
default = defaultFormat;
|
||||
description = "Terraform formatter to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
|
|
@ -59,12 +93,29 @@ in {
|
|||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
vim = {
|
||||
lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.formatter.conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
formatters_by_ft.terraform = cfg.format.type;
|
||||
formatters =
|
||||
mapListToAttrs (name: {
|
||||
inherit name;
|
||||
value = formats.${name};
|
||||
})
|
||||
cfg.format.type;
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
115
modules/plugins/languages/tex.nix
Normal file
115
modules/plugins/languages/tex.nix
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) attrNames;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.options) literalExpression mkEnableOption mkOption;
|
||||
inherit (lib.types) bool enum listOf;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
|
||||
cfg = config.vim.languages.tex;
|
||||
defaultServers = ["texlab"];
|
||||
servers = {
|
||||
texlab = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.texlab) "run"];
|
||||
filetypes = ["plaintex" "tex" "bib"];
|
||||
root_markers = [".git" ".latexmkrc" "latexmkrc" ".texlabroot" "texlabroot" ".texstudio" "Tectonic.toml"];
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = ["tex-fmt"];
|
||||
formats = {
|
||||
tex-fmt = {
|
||||
command = getExe pkgs.tex-fmt;
|
||||
};
|
||||
latexindent = {
|
||||
command = "${pkgs.texlive.withPackages (ps: [ps.latexindent])}/bin/latexindent";
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.tex = {
|
||||
enable = mkEnableOption "TeX language support";
|
||||
|
||||
treesitter = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
description = "Enable TeX treesitter";
|
||||
};
|
||||
latexPackage = mkGrammarOption pkgs "latex";
|
||||
bibtexPackage = mkGrammarOption pkgs "bibtex";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable =
|
||||
mkEnableOption "TeX LSP support"
|
||||
// {
|
||||
default = config.vim.lsp.enable;
|
||||
defaultText = literalExpression "config.vim.lsp.enable";
|
||||
};
|
||||
|
||||
servers = mkOption {
|
||||
description = "TeX LSP server to use";
|
||||
type = listOf (enum (attrNames servers));
|
||||
default = defaultServers;
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
enable =
|
||||
mkEnableOption "TeX formatting"
|
||||
// {
|
||||
default = config.vim.languages.enableFormat;
|
||||
defaultText = literalExpression "config.vim.languages.enableFormat";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = listOf (enum (attrNames formats));
|
||||
default = defaultFormat;
|
||||
description = "TeX formatter to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [
|
||||
cfg.treesitter.latexPackage
|
||||
cfg.treesitter.bibtexPackage
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.servers =
|
||||
mapListToAttrs (n: {
|
||||
name = n;
|
||||
value = servers.${n};
|
||||
})
|
||||
cfg.lsp.servers;
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.formatter.conform-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
formatters_by_ft.tex = cfg.format.type;
|
||||
formatters_by_ft.plaintex = cfg.format.type;
|
||||
formatters =
|
||||
mapListToAttrs (name: {
|
||||
inherit name;
|
||||
value = formats.${name};
|
||||
})
|
||||
cfg.format.type;
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
@ -120,6 +120,19 @@
|
|||
end
|
||||
'';
|
||||
};
|
||||
|
||||
tsgo = {
|
||||
cmd = [(getExe pkgs.typescript-go) "--lsp" "--stdio"];
|
||||
filetypes = [
|
||||
"javascript"
|
||||
"javascriptreact"
|
||||
"javascript.jsx"
|
||||
"typescript"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
];
|
||||
root_markers = ["tsconfig.json" "jsconfig.json" "package.json" ".git"];
|
||||
};
|
||||
};
|
||||
|
||||
denols_handlers = ''
|
||||
|
|
@ -186,6 +199,14 @@
|
|||
biome = {
|
||||
command = getExe pkgs.biome;
|
||||
};
|
||||
|
||||
biome-check = {
|
||||
command = getExe pkgs.biome;
|
||||
};
|
||||
|
||||
biome-organize-imports = {
|
||||
command = getExe pkgs.biome;
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: specify packages
|
||||
|
|
@ -208,6 +229,14 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
biomejs = let
|
||||
pkg = pkgs.biome;
|
||||
in {
|
||||
package = pkg;
|
||||
config = {
|
||||
cmd = getExe pkg;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
_file = ./ts.nix;
|
||||
|
|
@ -321,7 +350,7 @@ in {
|
|||
# .tsx/.jsx files
|
||||
typescriptreact = cfg.format.type;
|
||||
};
|
||||
setupOpts.formatters =
|
||||
formatters =
|
||||
mapListToAttrs (name: {
|
||||
inherit name;
|
||||
value = formats.${name};
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.binds) pushDownDefault;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.neorg;
|
||||
in {
|
||||
|
|
@ -19,17 +17,21 @@ in {
|
|||
"nvim-nio"
|
||||
"pathlib-nvim"
|
||||
"plenary-nvim"
|
||||
"neorg"
|
||||
"neorg-telescope"
|
||||
];
|
||||
|
||||
lazy.plugins.neorg = {
|
||||
package = "neorg";
|
||||
setupModule = "neorg";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
ft = ["norg"];
|
||||
cmd = ["Neorg"];
|
||||
};
|
||||
|
||||
binds.whichKey.register = pushDownDefault {
|
||||
"<leader>o" = "+Notes";
|
||||
};
|
||||
|
||||
pluginRC.neorg = entryAnywhere ''
|
||||
require('neorg').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,32 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.obsidian;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"obsidian-nvim"
|
||||
"vim-markdown"
|
||||
"tabular"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
pluginRC.obsidian = entryAnywhere ''
|
||||
require("obsidian").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
lazy.plugins.obsidian-nvim = {
|
||||
package = "obsidian-nvim";
|
||||
# NOTE: packaged plugin directory is `obsidian.nvim`; loading by the
|
||||
# spec key (`obsidian-nvim`) misses and makes `require("obsidian")`
|
||||
# resolve to a loader function via lzn-auto-require.
|
||||
# I don't love this, but I can't think of anything better
|
||||
load = ''
|
||||
vim.cmd.packadd("obsidian.nvim")
|
||||
'';
|
||||
setupModule = "obsidian";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
ft = ["markdown"];
|
||||
cmd = ["Obsidian"];
|
||||
};
|
||||
|
||||
notes.obsidian.setupOpts = let
|
||||
# may not be defined
|
||||
|
|
|
|||
|
|
@ -14,6 +14,32 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [pkgs.vimPlugins.conjure];
|
||||
vim.lazy.plugins.conjure = {
|
||||
package = pkgs.vimPlugins.conjure;
|
||||
ft = [
|
||||
"clojure"
|
||||
"fennel"
|
||||
"janet"
|
||||
"hy"
|
||||
"julia"
|
||||
"racket"
|
||||
"scheme"
|
||||
"lua"
|
||||
"lisp"
|
||||
"python"
|
||||
"rust"
|
||||
"sql"
|
||||
"javascript"
|
||||
"typescript"
|
||||
"php"
|
||||
"r"
|
||||
];
|
||||
cmd = [
|
||||
"ConjureSchool"
|
||||
"ConjureEval"
|
||||
"ConjureConnect"
|
||||
"ConjureClientState"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,29 @@ in {
|
|||
'';
|
||||
styles = ["dark" "darker" "cool" "deep" "warm" "warmer"];
|
||||
};
|
||||
gruber-darker = {
|
||||
setup = _: ''
|
||||
require('gruber-darker').setup({
|
||||
-- defaults
|
||||
bold = true,
|
||||
invert = {
|
||||
signs = false,
|
||||
tabline = false,
|
||||
visual = false,
|
||||
},
|
||||
italic = {
|
||||
strings = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
})
|
||||
vim.cmd('colorscheme gruber-darker')
|
||||
'';
|
||||
styles = ["dark"];
|
||||
};
|
||||
|
||||
tokyonight = {
|
||||
setup = {
|
||||
|
|
|
|||
|
|
@ -54,10 +54,6 @@ in {
|
|||
callback = function()
|
||||
vim.wo[0][0].foldmethod = "expr"
|
||||
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
-- This is optional, but is set rather as a sane default.
|
||||
-- If unset, opened files will be folded by automatically as
|
||||
-- the files are opened
|
||||
vim.o.foldenable = false
|
||||
end,
|
||||
})
|
||||
''}
|
||||
|
|
|
|||
18
modules/plugins/utility/crazy-coverage/config.nix
Normal file
18
modules/plugins/utility/crazy-coverage/config.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
cfg = config.vim.utility.crazy-coverage;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["crazy-coverage"];
|
||||
|
||||
vim.pluginRC.crazy-coverage = entryAnywhere ''
|
||||
require("crazy-coverage").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
11
modules/plugins/utility/crazy-coverage/crazy-coverage.nix
Normal file
11
modules/plugins/utility/crazy-coverage/crazy-coverage.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.utility.crazy-coverage = {
|
||||
enable = mkEnableOption "coverage for neovim";
|
||||
|
||||
setupOpts =
|
||||
mkPluginSetupOption "crazy-coverage.nvim" {};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/crazy-coverage/default.nix
Normal file
6
modules/plugins/utility/crazy-coverage/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./crazy-coverage.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -30,5 +30,6 @@
|
|||
./yanky-nvim
|
||||
./yazi-nvim
|
||||
./undotree
|
||||
./crazy-coverage
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ in {
|
|||
vim = {
|
||||
startPlugins = [
|
||||
"plenary-nvim"
|
||||
"fzf-lua"
|
||||
"nui-nvim"
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
);
|
||||
|
||||
# Build a given Treesitter grammar.
|
||||
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
|
||||
buildTreesitterPlug = grammars:
|
||||
vimPlugins.nvim-treesitter.withPlugins (
|
||||
_: builtins.filter (g: g != null) grammars
|
||||
);
|
||||
|
||||
pluginBuilders = {
|
||||
nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue