mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-28 05:54:28 +00:00
Merge branch 'main' into notashelf/push-qozvyzsvqtmk
This commit is contained in:
commit
96535d969d
33 changed files with 602 additions and 68 deletions
3
.github/typos.toml
vendored
3
.github/typos.toml
vendored
|
|
@ -9,6 +9,7 @@ default.extend-ignore-words-re = [
|
||||||
"edn",
|
"edn",
|
||||||
"esy",
|
"esy",
|
||||||
"BA", # somehow "BANanaD3V" is valid, but BA is not...
|
"BA", # somehow "BANanaD3V" is valid, but BA is not...
|
||||||
"Emac"
|
"Emac",
|
||||||
|
"tese" # for glsl shaders
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/cachix.yml
vendored
2
.github/workflows/cachix.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v31.9.0
|
uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
|
||||||
17
.github/workflows/check.yml
vendored
17
.github/workflows/check.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31.9.0
|
- uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v31.9.0
|
uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
@ -93,13 +93,20 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31.9.0
|
- uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
substituters = https://cache.nixos.org/ https://feel-co.cachix.org
|
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=
|
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w=
|
||||||
|
|
||||||
|
- uses: cachix/cachix-action@v16
|
||||||
|
with:
|
||||||
|
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||||
|
extraPullNames: nix-community
|
||||||
|
name: nvf
|
||||||
|
pushFilter: '(ndg-\d+\.\d+\.\d+$)'
|
||||||
|
|
||||||
- name: Set default git branch (to reduce log spam)
|
- name: Set default git branch (to reduce log spam)
|
||||||
run: git config --global init.defaultBranch main
|
run: git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
|
@ -124,7 +131,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31.9.0
|
- uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
@ -162,7 +169,7 @@ jobs:
|
||||||
cat "$HOME/changed_files"
|
cat "$HOME/changed_files"
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@v31.9.0
|
uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31.9.0
|
- uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
|
||||||
2
.github/workflows/manual.yml
vendored
2
.github/workflows/manual.yml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: cachix/install-nix-action@v31.9.0
|
- uses: cachix/install-nix-action@v31.9.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
|
|
|
||||||
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: "Install Nix"
|
- name: "Install Nix"
|
||||||
uses: cachix/install-nix-action@v31.9.0
|
uses: cachix/install-nix-action@v31.9.1
|
||||||
|
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ isMaximal: {
|
||||||
# Languages that are enabled in the maximal configuration.
|
# Languages that are enabled in the maximal configuration.
|
||||||
bash.enable = isMaximal;
|
bash.enable = isMaximal;
|
||||||
clang.enable = isMaximal;
|
clang.enable = isMaximal;
|
||||||
|
cmake.enable = isMaximal;
|
||||||
css.enable = isMaximal;
|
css.enable = isMaximal;
|
||||||
html.enable = isMaximal;
|
html.enable = isMaximal;
|
||||||
json.enable = isMaximal;
|
json.enable = isMaximal;
|
||||||
|
|
@ -75,6 +76,7 @@ isMaximal: {
|
||||||
xml.enable = isMaximal;
|
xml.enable = isMaximal;
|
||||||
|
|
||||||
# Language modules that are not as common.
|
# Language modules that are not as common.
|
||||||
|
arduino.enable = false;
|
||||||
assembly.enable = false;
|
assembly.enable = false;
|
||||||
astro.enable = false;
|
astro.enable = false;
|
||||||
nu.enable = false;
|
nu.enable = false;
|
||||||
|
|
@ -84,6 +86,7 @@ isMaximal: {
|
||||||
scala.enable = false;
|
scala.enable = false;
|
||||||
r.enable = false;
|
r.enable = false;
|
||||||
gleam.enable = false;
|
gleam.enable = false;
|
||||||
|
glsl.enable = false;
|
||||||
dart.enable = false;
|
dart.enable = false;
|
||||||
ocaml.enable = false;
|
ocaml.enable = false;
|
||||||
elixir.enable = false;
|
elixir.enable = false;
|
||||||
|
|
@ -115,6 +118,7 @@ isMaximal: {
|
||||||
fidget-nvim.enable = true;
|
fidget-nvim.enable = true;
|
||||||
|
|
||||||
highlight-undo.enable = true;
|
highlight-undo.enable = true;
|
||||||
|
blink-indent.enable = true;
|
||||||
indent-blankline.enable = true;
|
indent-blankline.enable = true;
|
||||||
|
|
||||||
# Fun
|
# Fun
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,20 @@
|
||||||
|
|
||||||
[Snoweuph](https://github.com/snoweuph)
|
[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`.
|
||||||
|
|
||||||
|
- `languages.go.treesitter.gosumPackage`.
|
||||||
|
|
||||||
|
- `languages.go.treesitter.goworkPackage`.
|
||||||
|
|
||||||
|
- `languages.go.treesitter.gotmplPackage`.
|
||||||
|
|
||||||
- Fix `vim.assistant.codecompanion-nvim.setupOpts.display.diff.provider` to only
|
- Fix `vim.assistant.codecompanion-nvim.setupOpts.display.diff.provider` to only
|
||||||
allow valid options. `default` is no longer valid. `inline` and `split` are
|
allow valid options. `default` is no longer valid. `inline` and `split` are
|
||||||
two new valid options.
|
two new valid options.
|
||||||
|
|
@ -169,15 +183,37 @@
|
||||||
- Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in
|
- Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in
|
||||||
`languages.lua`.
|
`languages.lua`.
|
||||||
|
|
||||||
|
- Added [`mdformat`](https://mdformat.rtfd.io/) support to `languages.markdown`
|
||||||
|
with the extensions for [GFM](https://github.github.com/gfm/),
|
||||||
|
[front matter](https://www.markdownlang.com/advanced/frontmatter.html) and
|
||||||
|
[footnotes](https://www.markdownguide.org/extended-syntax/#footnotes).
|
||||||
|
|
||||||
- Added XML syntax highlighting, LSP support and formatting
|
- Added XML syntax highlighting, LSP support and formatting
|
||||||
|
|
||||||
|
- Added [mypy](https://www.mypy-lang.org/) to `languages.python` for extra
|
||||||
|
diagnostics.
|
||||||
|
|
||||||
- Added [tera](https://keats.github.io/tera/) language support (syntax
|
- Added [tera](https://keats.github.io/tera/) language support (syntax
|
||||||
highlighting only).
|
highlighting only).
|
||||||
|
|
||||||
|
- Added Debugging support to `languages.odin` with
|
||||||
|
[nvim-dap-odin](https://github.com/NANDquark/nvim-dap-odin).
|
||||||
|
|
||||||
|
- Disabled notifications for
|
||||||
|
[nvim-dap-odin](https://github.com/NANDquark/nvim-dap-odin), because it
|
||||||
|
contain no use full information, only spam, and it can't be made lazy.
|
||||||
|
|
||||||
- Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics.
|
- Added [`golangci-lint`](https://golangci-lint.run/) for more diagnostics.
|
||||||
|
|
||||||
|
- updated default filetypes for
|
||||||
|
[harper-ls](https://github.com/Automattic/harper) to match what they are
|
||||||
|
supposed to be.
|
||||||
|
|
||||||
- Added Makefile support via `languages.make`.
|
- Added Makefile support via `languages.make`.
|
||||||
|
|
||||||
|
- Fix `languages.hcl` init, depending on `comment-nvim` by checking if it is
|
||||||
|
enabled. Fixes a crash (#1350).
|
||||||
|
|
||||||
- Added Debugging support to `languages.php`.
|
- Added Debugging support to `languages.php`.
|
||||||
|
|
||||||
- Added Formatting support to `languages.php` via
|
- Added Formatting support to `languages.php` via
|
||||||
|
|
@ -202,9 +238,34 @@ https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
- Added [`grug-far.nvim`](https://github.com/MagicDuck/grug-far.nvim) the find
|
- Added [`grug-far.nvim`](https://github.com/MagicDuck/grug-far.nvim) the find
|
||||||
and replace tool for neovim.
|
and replace tool for neovim.
|
||||||
|
- Fix lsp `client.supports_method` deprecation warning in nvim v0.12.
|
||||||
|
- Add [`blink.indent`](https://github.com/saghen/blink.indent) indent guideline
|
||||||
|
plugin.
|
||||||
|
|
||||||
[Ladas552](https://github.com/Ladas552)
|
[Ladas552](https://github.com/Ladas552)
|
||||||
|
|
||||||
- Changed `withRuby` to not be enabled by default
|
- Changed `withRuby` to not be enabled by default
|
||||||
|
- Fix virtualtext mode in colorizer
|
||||||
|
|
||||||
|
[horriblename](https://github.com/horriblename):
|
||||||
|
|
||||||
|
- Ignore terminals by default in spell-checking
|
||||||
|
|
||||||
|
[poz](https://poz.pet):
|
||||||
|
|
||||||
|
[neocmakelsp]: https://github.com/neocmakelsp/neocmakelsp
|
||||||
|
[arduino-language-server]: https://github.com/arduino/arduino-language-server
|
||||||
|
[glsl_analyzer]: https://github.com/nolanderc/glsl_analyzer
|
||||||
|
|
||||||
|
- Add CMake support with [neocmakelsp].
|
||||||
|
- Add Arduino support with [arduino-language-server].
|
||||||
|
- Add GLSL support with [glsl_analyzer].
|
||||||
|
|
||||||
|
[itscrystalline](https://github.com/itscrystalline):
|
||||||
|
|
||||||
|
[img-clip.nvim]: https://github.com/hakonharnes/img-clip.nvim
|
||||||
|
|
||||||
|
- [img-clip.nvim]'s configuration now has it's own DAG entry, separate from
|
||||||
|
image-nvim.
|
||||||
|
|
||||||
<!-- vim: set textwidth=80: -->
|
<!-- vim: set textwidth=80: -->
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
rust-jemalloc-sys,
|
rust-jemalloc-sys,
|
||||||
writeShellScriptBin,
|
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "blink-cmp";
|
pname = "blink-cmp";
|
||||||
|
|
@ -22,6 +21,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
"info"
|
"info"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Tries to call git
|
||||||
|
preBuild = ''
|
||||||
|
rm build.rs
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cp -r {lua,plugin} "$out"
|
cp -r {lua,plugin} "$out"
|
||||||
|
|
||||||
|
|
@ -44,10 +48,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
|
|
||||||
cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";
|
cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
(writeShellScriptBin "git" "exit 1")
|
|
||||||
];
|
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
RUSTC_BOOTSTRAP = true;
|
RUSTC_BOOTSTRAP = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) length;
|
||||||
inherit (lib.modules) mkIf mkRenamedOptionModule;
|
inherit (lib.modules) mkIf mkRenamedOptionModule;
|
||||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||||
inherit (lib.strings) concatLines concatStringsSep optionalString;
|
inherit (lib.strings) concatLines concatStringsSep;
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
inherit (lib.types) listOf str attrsOf;
|
inherit (lib.types) listOf str attrsOf bool;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.lists) optional;
|
||||||
inherit (lib.nvim.dag) entryAfter;
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
|
||||||
cfg = config.vim.spellcheck;
|
cfg = config.vim.spellcheck;
|
||||||
in {
|
in {
|
||||||
|
|
@ -86,6 +87,12 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ignoreTerminal = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "Disable spell checking in terminal.";
|
||||||
|
};
|
||||||
|
|
||||||
programmingWordlist.enable = mkEnableOption ''
|
programmingWordlist.enable = mkEnableOption ''
|
||||||
vim-dirtytalk, a wordlist for programmers containing
|
vim-dirtytalk, a wordlist for programmers containing
|
||||||
common programming terms.
|
common programming terms.
|
||||||
|
|
@ -144,20 +151,25 @@ in {
|
||||||
spelllang = concatStringsSep "," cfg.languages;
|
spelllang = concatStringsSep "," cfg.languages;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Register an autocommand to disable spellchecking in buffers with given filetypes.
|
augroups = [{name = "nvf_spellcheck";}];
|
||||||
# If the list is empty, the autocommand does not need to be registered.
|
autocmds =
|
||||||
luaConfigRC.spellcheck = entryAfter ["basic"] (optionalString (cfg.ignoredFiletypes != []) ''
|
(optional cfg.ignoreTerminal {
|
||||||
-- Disable spellchecking for certain filetypes
|
event = ["TermOpen"];
|
||||||
-- as configured by `vim.spellcheck.ignoredFiletypes`
|
group = "nvf_spellcheck";
|
||||||
vim.api.nvim_create_augroup("nvf_autocmds", {clear = false})
|
callback = mkLuaInline ''
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
function() vim.opt_local.spell = false end
|
||||||
group = "nvf_autocmds",
|
'';
|
||||||
pattern = ${toLuaObject cfg.ignoredFiletypes},
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.spell = false
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
'');
|
++ (optional (length cfg.ignoredFiletypes > 0) {
|
||||||
|
event = ["FileType"];
|
||||||
|
group = "nvf_spellcheck";
|
||||||
|
pattern = cfg.ignoredFiletypes;
|
||||||
|
callback = mkLuaInline ''
|
||||||
|
function()
|
||||||
|
vim.opt_local.spell = false
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,11 @@
|
||||||
layoutDefined = cfg.layout != [];
|
layoutDefined = cfg.layout != [];
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim.startPlugins = [
|
vim = {
|
||||||
"alpha-nvim"
|
startPlugins = ["alpha-nvim"];
|
||||||
"nvim-web-devicons"
|
visuals.nvim-web-devicons.enable = true;
|
||||||
];
|
|
||||||
|
|
||||||
vim.pluginRC.alpha = let
|
pluginRC.alpha = let
|
||||||
setupOpts =
|
setupOpts =
|
||||||
if themeDefined
|
if themeDefined
|
||||||
then lib.generators.mkLuaInline "require'alpha.themes.${cfg.theme}'.config"
|
then lib.generators.mkLuaInline "require'alpha.themes.${cfg.theme}'.config"
|
||||||
|
|
@ -26,6 +25,7 @@ in {
|
||||||
in ''
|
in ''
|
||||||
require('alpha').setup(${toLuaObject setupOpts})
|
require('alpha').setup(${toLuaObject setupOpts})
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,8 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = [
|
startPlugins = ["nui-nvim"];
|
||||||
# dependencies
|
visuals.nvim-web-devicons.enable = true;
|
||||||
"nui-nvim" # ui library
|
|
||||||
"nvim-web-devicons" # glyphs
|
|
||||||
];
|
|
||||||
|
|
||||||
lazy.plugins = {
|
lazy.plugins = {
|
||||||
"hunk-nvim" = {
|
"hunk-nvim" = {
|
||||||
|
|
|
||||||
95
modules/plugins/languages/arduino.nix
Normal file
95
modules/plugins/languages/arduino.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) attrNames;
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
inherit (lib.meta) getExe getExe';
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) enum listOf str;
|
||||||
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.arduino;
|
||||||
|
|
||||||
|
defaultServers = ["arduino-language-server"];
|
||||||
|
servers = {
|
||||||
|
arduino-language-server = {
|
||||||
|
enable = true;
|
||||||
|
cmd =
|
||||||
|
[
|
||||||
|
(getExe pkgs.arduino-language-server)
|
||||||
|
"-clangd"
|
||||||
|
(getExe' pkgs.clang-tools "clangd")
|
||||||
|
"-cli"
|
||||||
|
(getExe pkgs.arduino-cli)
|
||||||
|
"-cli-config"
|
||||||
|
"$HOME/.arduino15/arduino-cli.yaml"
|
||||||
|
]
|
||||||
|
++ cfg.lsp.extraArgs;
|
||||||
|
filetypes = ["arduino"];
|
||||||
|
root_dir =
|
||||||
|
mkLuaInline
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''
|
||||||
|
function(bufnr, on_dir)
|
||||||
|
local fname = vim.api.nvim_buf_get_name(bufnr)
|
||||||
|
on_dir(util.root_pattern("*.ino")(fname))
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
capabilities = {
|
||||||
|
textDocument = {
|
||||||
|
semanticTokens = mkLuaInline "vim.NIL";
|
||||||
|
};
|
||||||
|
workspace = {
|
||||||
|
semanticTokens = mkLuaInline "vim.NIL";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.vim.languages.arduino = {
|
||||||
|
enable = mkEnableOption "Arduino support";
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = mkEnableOption "Arduino treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
package = mkGrammarOption pkgs "arduino";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = mkEnableOption "Arduino LSP support" // {default = config.vim.lsp.enable;};
|
||||||
|
servers = mkOption {
|
||||||
|
type = listOf (enum (attrNames servers));
|
||||||
|
default = defaultServers;
|
||||||
|
description = "Arduino LSP servers to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraArgs = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
description = "Extra arguments passed to the Arduino LSP";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
(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;
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
local function symbol_info()
|
local function symbol_info()
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
local clangd_client = vim.lsp.get_clients({ bufnr = bufnr, name = "clangd" })[1]
|
local clangd_client = vim.lsp.get_clients({ bufnr = bufnr, name = "clangd" })[1]
|
||||||
if not clangd_client or not clangd_client.supports_method 'textDocument/symbolInfo' then
|
if not clangd_client or not clangd_client:supports_method 'textDocument/symbolInfo' then
|
||||||
return vim.notify('Clangd client not found', vim.log.levels.ERROR)
|
return vim.notify('Clangd client not found', vim.log.levels.ERROR)
|
||||||
end
|
end
|
||||||
local win = vim.api.nvim_get_current_win()
|
local win = vim.api.nvim_get_current_win()
|
||||||
|
|
|
||||||
96
modules/plugins/languages/cmake.nix
Normal file
96
modules/plugins/languages/cmake.nix
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) attrNames;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.types) enum listOf package;
|
||||||
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.cmake;
|
||||||
|
|
||||||
|
defaultServers = ["neocmakelsp"];
|
||||||
|
servers = {
|
||||||
|
neocmakelsp = {
|
||||||
|
enable = true;
|
||||||
|
cmd = [(getExe pkgs.neocmakelsp) "--stdio"];
|
||||||
|
filetypes = ["cmake"];
|
||||||
|
root_markers = [".gersemirc" ".git" "build" "cmake"];
|
||||||
|
capabilities = {
|
||||||
|
textDocument.completion.completionItem.snippetSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
defaultFormat = "gersemi";
|
||||||
|
formats = {
|
||||||
|
gersemi = {
|
||||||
|
package = pkgs.gersemi;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.vim.languages.cmake = {
|
||||||
|
enable = mkEnableOption "CMake language support";
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = mkEnableOption "CMake treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
package = mkGrammarOption pkgs "cmake";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = mkEnableOption "CMake LSP support" // {default = config.vim.lsp.enable;};
|
||||||
|
servers = mkOption {
|
||||||
|
type = listOf (enum (attrNames servers));
|
||||||
|
default = defaultServers;
|
||||||
|
description = "CMake LSP servers to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
format = {
|
||||||
|
enable = mkEnableOption "CMake formatting" // {default = config.vim.languages.enableFormat;};
|
||||||
|
|
||||||
|
type = mkOption {
|
||||||
|
description = "CMake formatter to use";
|
||||||
|
type = enum (attrNames formats);
|
||||||
|
default = defaultFormat;
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
description = "CMake formatter package";
|
||||||
|
type = package;
|
||||||
|
default = formats.${cfg.format.type}.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
(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;
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.format.enable {
|
||||||
|
vim.formatter.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts.formatters_by_ft.cmake = [cfg.format.type];
|
||||||
|
setupOpts.formatters.${cfg.format.type} = {
|
||||||
|
command = getExe cfg.format.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
inherit (lib.nvim.languages) mkEnable;
|
inherit (lib.nvim.languages) mkEnable;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
./arduino.nix
|
||||||
./asm.nix
|
./asm.nix
|
||||||
./astro.nix
|
./astro.nix
|
||||||
./bash.nix
|
./bash.nix
|
||||||
|
|
@ -10,10 +11,12 @@ in {
|
||||||
./dart.nix
|
./dart.nix
|
||||||
./clang.nix
|
./clang.nix
|
||||||
./clojure.nix
|
./clojure.nix
|
||||||
|
./cmake.nix
|
||||||
./css.nix
|
./css.nix
|
||||||
./elixir.nix
|
./elixir.nix
|
||||||
./fsharp.nix
|
./fsharp.nix
|
||||||
./gleam.nix
|
./gleam.nix
|
||||||
|
./glsl.nix
|
||||||
./go.nix
|
./go.nix
|
||||||
./hcl.nix
|
./hcl.nix
|
||||||
./helm.nix
|
./helm.nix
|
||||||
|
|
|
||||||
63
modules/plugins/languages/glsl.nix
Normal file
63
modules/plugins/languages/glsl.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) attrNames;
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) enum listOf;
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.glsl;
|
||||||
|
|
||||||
|
defaultServers = ["glsl_analyzer"];
|
||||||
|
servers = {
|
||||||
|
glsl_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
cmd = [(getExe pkgs.glsl_analyzer)];
|
||||||
|
filetypes = ["glsl" "vert" "tesc" "tese" "frag" "geom" "comp"];
|
||||||
|
root_markers = [".git"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.vim.languages.glsl = {
|
||||||
|
enable = mkEnableOption "GLSL language support";
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = mkEnableOption "GLSL treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
package = mkGrammarOption pkgs "glsl";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = mkEnableOption "GLSL LSP support" // {default = config.vim.lsp.enable;};
|
||||||
|
|
||||||
|
servers = mkOption {
|
||||||
|
type = listOf (enum (attrNames servers));
|
||||||
|
default = defaultServers;
|
||||||
|
description = "GLSL LSP server to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
servers = {
|
servers = {
|
||||||
gopls = {
|
gopls = {
|
||||||
cmd = [(getExe pkgs.gopls)];
|
cmd = [(getExe pkgs.gopls)];
|
||||||
filetypes = ["go" "gomod" "gowork" "gotmpl"];
|
filetypes = ["go" "gomod" "gosum" "gowork" "gotmpl"];
|
||||||
root_dir = mkLuaInline ''
|
root_dir = mkLuaInline ''
|
||||||
function(bufnr, on_dir)
|
function(bufnr, on_dir)
|
||||||
local fname = vim.api.nvim_buf_get_name(bufnr)
|
local fname = vim.api.nvim_buf_get_name(bufnr)
|
||||||
|
|
@ -170,7 +170,11 @@ in {
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = mkEnableOption "Go treesitter" // {default = config.vim.languages.enableTreesitter;};
|
enable = mkEnableOption "Go treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
|
||||||
package = mkGrammarOption pkgs "go";
|
goPackage = mkGrammarOption pkgs "go";
|
||||||
|
gomodPackage = mkGrammarOption pkgs "gomod";
|
||||||
|
gosumPackage = mkGrammarOption pkgs "gosum";
|
||||||
|
goworkPackage = mkGrammarOption pkgs "gowork";
|
||||||
|
gotmplPackage = mkGrammarOption pkgs "gotmpl";
|
||||||
};
|
};
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
|
|
@ -232,7 +236,13 @@ in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
(mkIf cfg.treesitter.enable {
|
(mkIf cfg.treesitter.enable {
|
||||||
vim.treesitter.enable = true;
|
vim.treesitter.enable = true;
|
||||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
vim.treesitter.grammars = [
|
||||||
|
cfg.treesitter.goPackage
|
||||||
|
cfg.treesitter.gomodPackage
|
||||||
|
cfg.treesitter.gosumPackage
|
||||||
|
cfg.treesitter.goworkPackage
|
||||||
|
cfg.treesitter.gotmplPackage
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.lsp.enable {
|
(mkIf cfg.lsp.enable {
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,14 @@ in {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
${
|
||||||
|
if config.vim.comments.comment-nvim.enable
|
||||||
|
then ''
|
||||||
local ft = require('Comment.ft')
|
local ft = require('Comment.ft')
|
||||||
ft
|
ft.set('hcl', '#%s')
|
||||||
.set('hcl', '#%s')
|
''
|
||||||
|
else ""
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
(mkIf cfg.treesitter.enable {
|
(mkIf cfg.treesitter.enable {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) attrNames;
|
inherit (builtins) attrNames;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe getExe';
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.types) bool enum listOf str nullOr;
|
inherit (lib.types) bool enum listOf str nullOr;
|
||||||
|
|
@ -55,6 +55,15 @@
|
||||||
prettierd = {
|
prettierd = {
|
||||||
command = getExe pkgs.prettierd;
|
command = getExe pkgs.prettierd;
|
||||||
};
|
};
|
||||||
|
mdformat = {
|
||||||
|
command = getExe' (pkgs.python313Packages.python.withPackages (p:
|
||||||
|
with p; [
|
||||||
|
mdformat
|
||||||
|
mdformat-gfm
|
||||||
|
mdformat-frontmatter
|
||||||
|
mdformat-footnote
|
||||||
|
])) "mdformat";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
defaultDiagnosticsProvider = ["markdownlint-cli2"];
|
defaultDiagnosticsProvider = ["markdownlint-cli2"];
|
||||||
diagnosticsProviders = {
|
diagnosticsProviders = {
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,15 @@
|
||||||
inherit (builtins) attrNames;
|
inherit (builtins) attrNames;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.types) enum;
|
inherit (lib.types) enum package;
|
||||||
|
inherit (lib.nvim.dag) entryAfter;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.odin;
|
||||||
|
|
||||||
defaultServers = ["ols"];
|
defaultServers = ["ols"];
|
||||||
servers = {
|
servers = {
|
||||||
ols = {
|
ols = {
|
||||||
|
|
@ -32,7 +35,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = config.vim.languages.odin;
|
defaultDebugger = "codelldb";
|
||||||
|
debuggers = {
|
||||||
|
codelldb = {
|
||||||
|
package = pkgs.lldb;
|
||||||
|
dapConfig = ''
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = 'executable',
|
||||||
|
command = '${cfg.dap.package}/bin/lldb-dap',
|
||||||
|
name = 'codelldb'
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.vim.languages.odin = {
|
options.vim.languages.odin = {
|
||||||
enable = mkEnableOption "Odin language support";
|
enable = mkEnableOption "Odin language support";
|
||||||
|
|
@ -51,6 +66,22 @@ in {
|
||||||
description = "Odin LSP server to use";
|
description = "Odin LSP server to use";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dap = {
|
||||||
|
enable = mkEnableOption "Enable Odin Debug Adapter" // {default = config.vim.languages.enableDAP;};
|
||||||
|
|
||||||
|
debugger = mkOption {
|
||||||
|
description = "Odin debugger to use";
|
||||||
|
type = enum (attrNames debuggers);
|
||||||
|
default = defaultDebugger;
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
description = "Odin debugger package.";
|
||||||
|
type = package;
|
||||||
|
default = debuggers.${cfg.dap.debugger}.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
|
@ -67,5 +98,18 @@ in {
|
||||||
})
|
})
|
||||||
cfg.lsp.servers;
|
cfg.lsp.servers;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.dap.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["nvim-dap-odin"];
|
||||||
|
debugger.nvim-dap.sources.odin-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
|
||||||
|
pluginRC.nvim-dap-odin = entryAfter ["nvim-dap"] ''
|
||||||
|
require('nvim-dap-odin').setup({
|
||||||
|
notifications = false -- contains no useful information
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
debugger.nvim-dap.enable = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.types) enum package bool;
|
inherit (lib.types) enum package bool;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
inherit (lib.nvim.types) deprecatedSingleOrListOf;
|
inherit (lib.nvim.types) deprecatedSingleOrListOf diagnostics;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.dag) entryBefore;
|
inherit (lib.nvim.dag) entryBefore;
|
||||||
inherit (lib.trivial) warn;
|
inherit (lib.trivial) warn;
|
||||||
|
|
@ -278,6 +278,14 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
defaultDiagnosticsProvider = ["mypy"];
|
||||||
|
diagnosticsProviders = {
|
||||||
|
mypy = {
|
||||||
|
config = {
|
||||||
|
cmd = getExe' pkgs.mypy "mypy";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.vim.languages.python = {
|
options.vim.languages.python = {
|
||||||
enable = mkEnableOption "Python language support";
|
enable = mkEnableOption "Python language support";
|
||||||
|
|
@ -335,6 +343,15 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraDiagnostics = {
|
||||||
|
enable = mkEnableOption "extra Python diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;};
|
||||||
|
types = diagnostics {
|
||||||
|
langDesc = "Python";
|
||||||
|
inherit diagnosticsProviders;
|
||||||
|
inherit defaultDiagnosticsProvider;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
|
@ -404,5 +421,15 @@ in {
|
||||||
vim.debugger.nvim-dap.enable = true;
|
vim.debugger.nvim-dap.enable = true;
|
||||||
vim.debugger.nvim-dap.sources.python-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
|
vim.debugger.nvim-dap.sources.python-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.extraDiagnostics.enable {
|
||||||
|
vim.diagnostics.nvim-lint = {
|
||||||
|
enable = true;
|
||||||
|
linters_by_ft.python = cfg.extraDiagnostics.types;
|
||||||
|
linters =
|
||||||
|
mkMerge (map (name: {${name} = diagnosticsProviders.${name}.config;})
|
||||||
|
cfg.extraDiagnostics.types);
|
||||||
|
};
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ in {
|
||||||
default_on_attach(client, bufnr)
|
default_on_attach(client, bufnr)
|
||||||
|
|
||||||
${optionalString cfg.inlayHints.enable ''
|
${optionalString cfg.inlayHints.enable ''
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
|
||||||
end
|
end
|
||||||
''}
|
''}
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,47 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && cfg.harper-ls.enable) {
|
config = mkIf (cfg.enable && cfg.harper-ls.enable) {
|
||||||
vim.lsp.servers.harper-ls = {
|
vim.lsp.servers.harper-ls = {
|
||||||
root_markers = [".git"];
|
root_markers = [".git" ".harper-dictionary.txt"];
|
||||||
cmd = [(getExe pkgs.harper) "--stdio"];
|
cmd = [(getExe pkgs.harper) "--stdio"];
|
||||||
settings = {harper-ls = cfg.harper-ls.settings;};
|
settings = {harper-ls = cfg.harper-ls.settings;};
|
||||||
|
filetypes =
|
||||||
|
# <https://writewithharper.com/docs/integrations/language-server#Supported-Languages>
|
||||||
|
[
|
||||||
|
"asciidoc"
|
||||||
|
"c"
|
||||||
|
"clojure"
|
||||||
|
"cmake"
|
||||||
|
"cpp"
|
||||||
|
"cs"
|
||||||
|
"daml"
|
||||||
|
"dart"
|
||||||
|
"gitcommit"
|
||||||
|
"go"
|
||||||
|
"haskell"
|
||||||
|
"html"
|
||||||
|
"ink"
|
||||||
|
"java"
|
||||||
|
"javascript"
|
||||||
|
"javascriptreact"
|
||||||
|
"kotlin"
|
||||||
|
"lhaskell"
|
||||||
|
"lua"
|
||||||
|
"mail"
|
||||||
|
"markdown"
|
||||||
|
"nix"
|
||||||
|
"php"
|
||||||
|
"python"
|
||||||
|
"ruby"
|
||||||
|
"rust"
|
||||||
|
"scala"
|
||||||
|
"sh"
|
||||||
|
"swift"
|
||||||
|
"text"
|
||||||
|
"toml"
|
||||||
|
"typescript"
|
||||||
|
"typescriptreact"
|
||||||
|
"typst"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
mode = mkOption {
|
mode = mkOption {
|
||||||
description = "Set the display mode";
|
description = "Set the display mode";
|
||||||
type = nullOr (enum ["foreground" "background"]);
|
type = nullOr (enum ["foreground" "background" "virtualtext"]);
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ in {
|
||||||
"img-clip"
|
"img-clip"
|
||||||
];
|
];
|
||||||
|
|
||||||
pluginRC.image-nvim = entryAnywhere ''
|
pluginRC.img-clip = entryAnywhere ''
|
||||||
require("img-clip").setup(${toLuaObject cfg.setupOpts})
|
require("img-clip").setup(${toLuaObject cfg.setupOpts})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
9
modules/plugins/visuals/blink-indent/blink-indent.nix
Normal file
9
modules/plugins/visuals/blink-indent/blink-indent.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.visuals.blink-indent = {
|
||||||
|
enable = mkEnableOption "indentation guides [blink-indent]";
|
||||||
|
setupOpts = mkPluginSetupOption "blink-indent" {};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/plugins/visuals/blink-indent/config.nix
Normal file
19
modules/plugins/visuals/blink-indent/config.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
|
||||||
|
cfg = config.vim.visuals.blink-indent;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim.lazy.plugins.blink-indent = {
|
||||||
|
package = "blink-indent";
|
||||||
|
setupModule = "blink.indent";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
|
||||||
|
event = ["BufEnter"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/plugins/visuals/blink-indent/default.nix
Normal file
6
modules/plugins/visuals/blink-indent/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./blink-indent.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,7 @@ in {
|
||||||
toggles under individual options.
|
toggles under individual options.
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
./blink-indent
|
||||||
./cellular-automaton
|
./cellular-automaton
|
||||||
./cinnamon-nvim
|
./cinnamon-nvim
|
||||||
./fidget-nvim
|
./fidget-nvim
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["tiny-devicons-auto-colors-nvim" "nvim-web-devicons"];
|
startPlugins = ["tiny-devicons-auto-colors-nvim"];
|
||||||
|
visuals.nvim-web-devicons.enable = true;
|
||||||
|
|
||||||
pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
|
pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
|
||||||
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
|
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
nodeJs.enable = config.vim.withNodeJs;
|
nodeJs.enable = config.vim.withNodeJs;
|
||||||
python3 = {
|
python3 = {
|
||||||
enable = config.vim.withPython3;
|
enable = config.vim.withPython3;
|
||||||
extraPackages = ps: map (flip builtins.getAttr ps) config.vim.python3Packages;
|
extraPackages = ps: (map (flip builtins.getAttr ps) config.vim.python3Packages) ++ [ps.pynvim];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,19 @@
|
||||||
"url": "https://github.com/moyiz/blink-emoji.nvim/archive/f22ce8cac02a6ece05368220f1e38bd34fe376f9.tar.gz",
|
"url": "https://github.com/moyiz/blink-emoji.nvim/archive/f22ce8cac02a6ece05368220f1e38bd34fe376f9.tar.gz",
|
||||||
"hash": "sha256-pPHESNsByHg2liNUYkUEVR1wP1MZcil1sKTqrNI53e4="
|
"hash": "sha256-pPHESNsByHg2liNUYkUEVR1wP1MZcil1sKTqrNI53e4="
|
||||||
},
|
},
|
||||||
|
"blink-indent": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.indent"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "9c80820ca77218a8d28e70075d6f44a1609911fe",
|
||||||
|
"url": "https://github.com/saghen/blink.indent/archive/9c80820ca77218a8d28e70075d6f44a1609911fe.tar.gz",
|
||||||
|
"hash": "sha256-SS66JZFCX8viYxYaObASlwtrG5h7yHbVvRBVXBNXkng="
|
||||||
|
},
|
||||||
"blink-ripgrep-nvim": {
|
"blink-ripgrep-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -1873,6 +1886,19 @@
|
||||||
"url": "https://github.com/leoluz/nvim-dap-go/archive/b4421153ead5d726603b02743ea40cf26a51ed5f.tar.gz",
|
"url": "https://github.com/leoluz/nvim-dap-go/archive/b4421153ead5d726603b02743ea40cf26a51ed5f.tar.gz",
|
||||||
"hash": "sha256-wg9kiW2eAMmg4bvgqaAS9kt7qaVsIWl36BNqRbhZIgo="
|
"hash": "sha256-wg9kiW2eAMmg4bvgqaAS9kt7qaVsIWl36BNqRbhZIgo="
|
||||||
},
|
},
|
||||||
|
"nvim-dap-odin": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "NANDquark",
|
||||||
|
"repo": "nvim-dap-odin"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "4df40d467f4ea5195e2f3b813d970eb15172b052",
|
||||||
|
"url": "https://github.com/NANDquark/nvim-dap-odin/archive/4df40d467f4ea5195e2f3b813d970eb15172b052.tar.gz",
|
||||||
|
"hash": "sha256-/bW22gWrPamK4jDMJYDv/3od+vIUb/eYICnHWnv8MVU="
|
||||||
|
},
|
||||||
"nvim-dap-ui": {
|
"nvim-dap-ui": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue