Compare commits
10 commits
a06b732d25
...
4b8c4ae091
Author | SHA1 | Date | |
---|---|---|---|
4b8c4ae091 | |||
b211853775 | |||
0a5c8fb475 | |||
fd41fbaf5b | |||
9301482cda | |||
f0a1b294e9 | |||
10f393c35a | |||
98ef1506d1 | |||
fbb792f884 | |||
90f90bcf48 |
8 changed files with 1919 additions and 113 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
tags
|
tags
|
||||||
.luarc.json
|
.luarc.json
|
||||||
/result
|
/result
|
||||||
|
.devenv
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
1739
flake.lock
1739
flake.lock
File diff suppressed because it is too large
Load diff
75
flake.nix
75
flake.nix
|
@ -7,6 +7,8 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
nixCats.url = "github:BirdeeHub/nixCats-nvim";
|
nixCats.url = "github:BirdeeHub/nixCats-nvim";
|
||||||
|
|
||||||
|
devenv.url = "github:cachix/devenv";
|
||||||
|
|
||||||
neovim-nightly-overlay = {
|
neovim-nightly-overlay = {
|
||||||
url = "github:nix-community/neovim-nightly-overlay";
|
url = "github:nix-community/neovim-nightly-overlay";
|
||||||
};
|
};
|
||||||
|
@ -27,10 +29,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
|
||||||
|
extra-substituters = "https://devenv.cachix.org";
|
||||||
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixCats,
|
nixCats,
|
||||||
|
devenv,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
inherit (nixCats) utils;
|
inherit (nixCats) utils;
|
||||||
|
@ -47,11 +55,11 @@
|
||||||
|
|
||||||
categoryDefinitions = {
|
categoryDefinitions = {
|
||||||
pkgs,
|
pkgs,
|
||||||
settings,
|
# settings,
|
||||||
categories,
|
# categories,
|
||||||
extra,
|
# extra,
|
||||||
name,
|
name,
|
||||||
mkNvimPlugin,
|
# mkNvimPlugin,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
lspsAndRuntimeDeps = with pkgs; let
|
lspsAndRuntimeDeps = with pkgs; let
|
||||||
|
@ -65,9 +73,14 @@
|
||||||
alejandra
|
alejandra
|
||||||
bash-language-server
|
bash-language-server
|
||||||
biome
|
biome
|
||||||
|
codespell
|
||||||
curl
|
curl
|
||||||
|
deadnix
|
||||||
|
djlint
|
||||||
docker-compose-language-service
|
docker-compose-language-service
|
||||||
dockerfile-language-server-nodejs
|
dockerfile-language-server-nodejs
|
||||||
|
dotenv-linter
|
||||||
|
editorconfig-checker
|
||||||
emmet-language-server
|
emmet-language-server
|
||||||
fd
|
fd
|
||||||
fish-lsp
|
fish-lsp
|
||||||
|
@ -77,12 +90,14 @@
|
||||||
grpcurl
|
grpcurl
|
||||||
hadolint
|
hadolint
|
||||||
helm-ls
|
helm-ls
|
||||||
|
htmlhint
|
||||||
jq
|
jq
|
||||||
lazygit
|
lazygit
|
||||||
lua-language-server
|
lua-language-server
|
||||||
markdownlint-cli2
|
markdownlint-cli2
|
||||||
marksman
|
marksman
|
||||||
nil
|
nil
|
||||||
|
nodePackages.alex
|
||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
npm-modules.css-variables-language-server
|
npm-modules.css-variables-language-server
|
||||||
npm-modules.gh-actions-language-server
|
npm-modules.gh-actions-language-server
|
||||||
|
@ -116,6 +131,7 @@
|
||||||
vue-language-server
|
vue-language-server
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
yamllint
|
yamllint
|
||||||
|
zizmor
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -261,6 +277,9 @@
|
||||||
nvim-nio
|
nvim-nio
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
|
# edgy.nvim
|
||||||
|
edgy-nvim
|
||||||
|
|
||||||
# Mini Animate
|
# Mini Animate
|
||||||
{
|
{
|
||||||
plugin = mini-animate;
|
plugin = mini-animate;
|
||||||
|
@ -332,7 +351,7 @@
|
||||||
packageDefinitions = {
|
packageDefinitions = {
|
||||||
nvim = {
|
nvim = {
|
||||||
pkgs,
|
pkgs,
|
||||||
mkNvimPlugin,
|
# mkNvimPlugin,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -345,7 +364,9 @@
|
||||||
general = true;
|
general = true;
|
||||||
test = false;
|
test = false;
|
||||||
};
|
};
|
||||||
extra = {};
|
extra = {
|
||||||
|
vue-ls-path = "${pkgs.lib.getExe pkgs.vue-language-server}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -363,17 +384,39 @@
|
||||||
defaultPackage = nixCatsBuilder defaultPackageName;
|
defaultPackage = nixCatsBuilder defaultPackageName;
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
in {
|
in {
|
||||||
packages = utils.mkAllWithDefault defaultPackage;
|
packages =
|
||||||
|
(utils.mkAllWithDefault defaultPackage)
|
||||||
# Choose your package for devShell and add whatever else you want in it.
|
// {
|
||||||
devShells = {
|
devenv-up = self.devShells.${system}.default.config.procfileScript;
|
||||||
default = pkgs.mkShell {
|
devenv-test = self.devShells.${system}.default.config.test;
|
||||||
name = defaultPackageName;
|
|
||||||
packages = [defaultPackage];
|
|
||||||
inputsFrom = [];
|
|
||||||
shellHook = ''
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShells.default = devenv.lib.mkShell {
|
||||||
|
inherit inputs pkgs;
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
|
# {
|
||||||
|
# pkgs,
|
||||||
|
# config,
|
||||||
|
# ...
|
||||||
|
# }:
|
||||||
|
_: {
|
||||||
|
packages = [
|
||||||
|
defaultPackage
|
||||||
|
];
|
||||||
|
|
||||||
|
pre-commit.hooks = {
|
||||||
|
alejandra.enable = true;
|
||||||
|
deadnix.enable = true;
|
||||||
|
statix.enable = true;
|
||||||
|
stylua.enable = true;
|
||||||
|
end-of-file-fixer.enable = true;
|
||||||
|
trim-trailing-whitespace.enable = true;
|
||||||
|
no-commit-to-branch.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
// (let
|
// (let
|
||||||
|
|
181
init.lua
181
init.lua
|
@ -1,17 +1,15 @@
|
||||||
-- NOTE: this just gives nixCats global command a default value
|
require('nixCatsUtils').setup({
|
||||||
-- so that it doesnt throw an error if you didnt install via nix.
|
|
||||||
-- usage of both this setup and the nixCats command is optional,
|
|
||||||
-- but it is very useful for passing info from nix to lua so you will likely use it at least once.
|
|
||||||
require('nixCatsUtils').setup {
|
|
||||||
non_nix_value = true,
|
non_nix_value = true,
|
||||||
}
|
})
|
||||||
|
|
||||||
-- NOTE: You might want to move the lazy-lock.json file
|
|
||||||
local function getlockfilepath()
|
local function getlockfilepath()
|
||||||
if require('nixCatsUtils').isNixCats and type(nixCats.settings.unwrappedCfgPath) == 'string' then
|
if
|
||||||
|
require('nixCatsUtils').isNixCats
|
||||||
|
and type(nixCats.settings.unwrappedCfgPath) == 'string'
|
||||||
|
then
|
||||||
return nixCats.settings.unwrappedCfgPath .. '/lazy-lock.json'
|
return nixCats.settings.unwrappedCfgPath .. '/lazy-lock.json'
|
||||||
else
|
else
|
||||||
return vim.fn.stdpath 'config' .. '/lazy-lock.json'
|
return vim.fn.stdpath('config') .. '/lazy-lock.json'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local lazyOptions = {
|
local lazyOptions = {
|
||||||
|
@ -21,93 +19,110 @@ local lazyOptions = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- NOTE: this the lazy wrapper. Use it like require('lazy').setup() but with an
|
require('nixCatsUtils.lazyCat').setup(
|
||||||
-- extra argument, the path to lazy.nvim as downloaded by nix, or nil, before
|
nixCats.pawsible({ 'allPlugins', 'start', 'lazy.nvim' }),
|
||||||
-- the normal arguments.
|
|
||||||
require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start', 'lazy.nvim' }, {
|
|
||||||
{ 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'folke/lazydev.nvim',
|
{ 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
|
||||||
ft = 'lua',
|
|
||||||
opts = {
|
{
|
||||||
library = {
|
'folke/lazydev.nvim',
|
||||||
-- Adds type hints for nixCats global, but LazyDev is just nice in
|
ft = 'lua',
|
||||||
-- general.
|
opts = {
|
||||||
{ path = (nixCats.nixCatsPath or '') .. '/lua', words = { 'nixCats' } },
|
library = {
|
||||||
|
{
|
||||||
|
path = (nixCats.nixCatsPath or '') .. '/lua',
|
||||||
|
words = { 'nixCats' },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
-- Extras.
|
-- Extras.
|
||||||
{ import = 'lazyvim.plugins.extras.coding.luasnip' },
|
{ import = 'lazyvim.plugins.extras.coding.luasnip' },
|
||||||
{ import = 'lazyvim.plugins.extras.coding.mini-comment' },
|
{ import = 'lazyvim.plugins.extras.coding.mini-comment' },
|
||||||
{ import = 'lazyvim.plugins.extras.coding.mini-surround' },
|
{ import = 'lazyvim.plugins.extras.coding.mini-surround' },
|
||||||
{ import = 'lazyvim.plugins.extras.coding.neogen' },
|
{ import = 'lazyvim.plugins.extras.coding.neogen' },
|
||||||
{ import = 'lazyvim.plugins.extras.coding.yanky' },
|
{ import = 'lazyvim.plugins.extras.coding.yanky' },
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.editor.aerial' },
|
-- Edgy is required to be imported before aerial.
|
||||||
{ import = 'lazyvim.plugins.extras.editor.dial' },
|
{ import = 'lazyvim.plugins.extras.ui.edgy' },
|
||||||
{ import = 'lazyvim.plugins.extras.editor.navic' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.editor.neo-tree' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.editor.refactoring' },
|
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.formatting.biome' },
|
{ import = 'lazyvim.plugins.extras.editor.aerial' },
|
||||||
{ import = 'lazyvim.plugins.extras.formatting.prettier' },
|
{ import = 'lazyvim.plugins.extras.editor.dial' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.editor.navic' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.editor.neo-tree' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.editor.refactoring' },
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.docker' },
|
{ import = 'lazyvim.plugins.extras.formatting.biome' },
|
||||||
{ import = 'lazyvim.plugins.extras.lang.git' },
|
{ import = 'lazyvim.plugins.extras.formatting.prettier' },
|
||||||
{ import = 'lazyvim.plugins.extras.lang.go' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.helm' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.json' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.markdown' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.nix' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.nushell' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.php' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.python' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.ruby' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.sql' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.tailwind' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.terraform' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.toml' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.typescript' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.vue' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.lang.yaml' },
|
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.linting.eslint' },
|
{ import = 'lazyvim.plugins.extras.lang.docker' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.git' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.go' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.helm' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.json' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.markdown' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.nix' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.nushell' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.php' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.python' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.ruby' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.sql' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.tailwind' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.terraform' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.toml' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.typescript' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.vue' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.lang.yaml' },
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.test.core' },
|
{ import = 'lazyvim.plugins.extras.linting.eslint' },
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.ui.mini-animate' },
|
{ import = 'lazyvim.plugins.extras.test.core' },
|
||||||
{ import = 'lazyvim.plugins.extras.ui.treesitter-context' },
|
|
||||||
|
|
||||||
{ import = 'lazyvim.plugins.extras.util.dot' },
|
{ import = 'lazyvim.plugins.extras.ui.mini-animate' },
|
||||||
{ import = 'lazyvim.plugins.extras.util.mini-hipatterns' },
|
{ import = 'lazyvim.plugins.extras.ui.treesitter-context' },
|
||||||
{ import = 'lazyvim.plugins.extras.util.octo' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.util.project' },
|
|
||||||
{ import = 'lazyvim.plugins.extras.util.rest' },
|
|
||||||
|
|
||||||
-- These need to be after extras to prevent extras from overwriting them.
|
{ import = 'lazyvim.plugins.extras.util.dot' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.util.mini-hipatterns' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.util.octo' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.util.project' },
|
||||||
|
{ import = 'lazyvim.plugins.extras.util.rest' },
|
||||||
|
|
||||||
-- Disable mason.nvim while using nix.
|
-- These need to be after extras to prevent extras from overwriting them.
|
||||||
-- Precompiled binaries do not agree with nixos, and we can just make nix
|
|
||||||
-- install this stuff for us.
|
|
||||||
{ 'williamboman/mason-lspconfig.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) },
|
|
||||||
{ 'williamboman/mason.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) },
|
|
||||||
|
|
||||||
{
|
-- Disable mason.nvim while using Nix.
|
||||||
'nvim-treesitter/nvim-treesitter',
|
{
|
||||||
build = require('nixCatsUtils').lazyAdd ':TSUpdate',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
opts_extend = require('nixCatsUtils').lazyAdd(nil, false),
|
enabled = require('nixCatsUtils').lazyAdd(true, false),
|
||||||
opts = {
|
},
|
||||||
-- Nix already ensured they were installed, and we would need to change
|
{
|
||||||
-- the parser_install_dir if we wanted to use it instead.
|
'williamboman/mason.nvim',
|
||||||
-- So we just disable install and do it via nix.
|
enabled = require('nixCatsUtils').lazyAdd(true, false),
|
||||||
ensure_installed = require('nixCatsUtils').lazyAdd({ 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, false),
|
|
||||||
auto_install = require('nixCatsUtils').lazyAdd(true, false),
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
-- import/override with your plugins
|
{
|
||||||
{ import = 'plugins' },
|
'nvim-treesitter/nvim-treesitter',
|
||||||
}, lazyOptions)
|
build = require('nixCatsUtils').lazyAdd(':TSUpdate'),
|
||||||
|
opts_extend = require('nixCatsUtils').lazyAdd(nil, false),
|
||||||
|
opts = {
|
||||||
|
-- Disable parser installation while using Nix.
|
||||||
|
ensure_installed = require('nixCatsUtils').lazyAdd({
|
||||||
|
'bash',
|
||||||
|
'c',
|
||||||
|
'diff',
|
||||||
|
'html',
|
||||||
|
'lua',
|
||||||
|
'luadoc',
|
||||||
|
'markdown',
|
||||||
|
'vim',
|
||||||
|
'vimdoc',
|
||||||
|
}, false),
|
||||||
|
auto_install = require('nixCatsUtils').lazyAdd(true, false),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = 'plugins' },
|
||||||
|
},
|
||||||
|
lazyOptions
|
||||||
|
)
|
||||||
|
|
|
@ -2,3 +2,10 @@ vim.o.textwidth = 80
|
||||||
vim.o.colorcolumn = '+1'
|
vim.o.colorcolumn = '+1'
|
||||||
|
|
||||||
vim.g.lazyvim_prettier_needs_config = true
|
vim.g.lazyvim_prettier_needs_config = true
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = {
|
||||||
|
['%.env%.[%w_.-]+'] = 'sh.env',
|
||||||
|
['.*/.github/workflows/.*%.yml'] = 'yaml.ghaction',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
|
@ -3,11 +3,23 @@ return {
|
||||||
'mfussenegger/nvim-lint',
|
'mfussenegger/nvim-lint',
|
||||||
opts = {
|
opts = {
|
||||||
linters_by_ft = {
|
linters_by_ft = {
|
||||||
|
['*'] = { 'codespell', 'editorconfig-checker', 'alex' },
|
||||||
bash = { 'shellcheck' },
|
bash = { 'shellcheck' },
|
||||||
css = { 'stylelint' },
|
css = { 'stylelint' },
|
||||||
|
django = { 'djlint' },
|
||||||
|
env = { 'dotenv-linter' },
|
||||||
|
ghaction = { 'zizmor' },
|
||||||
|
handlebars = { 'djlint' },
|
||||||
|
html = { 'htmlhint' },
|
||||||
|
jinja = { 'djlint' },
|
||||||
|
mustache = { 'djlint' },
|
||||||
|
nix = { 'deadnix', 'statix' },
|
||||||
|
nunjucks = { 'djlint' },
|
||||||
scss = { 'stylelint' },
|
scss = { 'stylelint' },
|
||||||
sh = { 'shellcheck' },
|
sh = { 'shellcheck' },
|
||||||
|
twig = { 'djlint' },
|
||||||
yaml = { 'yamllint' },
|
yaml = { 'yamllint' },
|
||||||
|
zsh = { 'zsh' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,19 @@ return {
|
||||||
somesass_ls = {},
|
somesass_ls = {},
|
||||||
statix = {},
|
statix = {},
|
||||||
stylelint_lsp = {},
|
stylelint_lsp = {},
|
||||||
|
|
||||||
|
-- Fix for nix installation of vue-language-server.
|
||||||
|
vtsls = {
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
tsserver = {
|
||||||
|
globalPlugins = {
|
||||||
|
location = nixCats.extra('vue-ls-path'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
3
statix.toml
Normal file
3
statix.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
disabled = []
|
||||||
|
nix_version = '2.4'
|
||||||
|
ignore = ['.devenv', 'packages/npm-modules']
|
Loading…
Reference in a new issue