formatting/linting added for lua/ts
This commit is contained in:
parent
e54f6ee975
commit
61d3aec608
18 changed files with 338 additions and 710 deletions
184
flake.nix
184
flake.nix
|
@ -5,132 +5,18 @@
|
|||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
|
||||
# Names should always be `nvim_plugin-[lazy plugin name]`
|
||||
"nvim_plugin-folke/lazy.nvim" = {
|
||||
url = "github:folke/lazy.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-lua/plenary.nvim" = {
|
||||
url = "github:nvim-lua/plenary.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-catppuccin/nvim" = {
|
||||
url = "github:catppuccin/nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-Pocco81/auto-save.nvim" = {
|
||||
url = "github:Pocco81/auto-save.nvim";
|
||||
flake = false;
|
||||
};
|
||||
# Only need to add plugins as flake inputs if they are:
|
||||
# - Missing in nixpkgs
|
||||
# - We want to pin a specific version diverging from nixpkgs channel
|
||||
"nvim_plugin-chrisgrieser/nvim-early-retirement" = {
|
||||
url = "github:chrisgrieser/nvim-early-retirement";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-MunifTanjim/nui.nvim" = {
|
||||
url = "github:MunifTanjim/nui.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-rcarriga/nvim-notify" = {
|
||||
url = "github:rcarriga/nvim-notify";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-folke/noice.nvim" = {
|
||||
url = "github:folke/noice.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-declancm/cinnamon.nvim" = {
|
||||
url = "github:declancm/cinnamon.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-lualine/lualine.nvim" = {
|
||||
url = "github:nvim-lualine/lualine.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-folke/which-key.nvim" = {
|
||||
url = "github:folke/which-key.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-telescope/telescope.nvim" = {
|
||||
url = "github:nvim-telescope/telescope.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-telescope/telescope-fzf-native.nvim" = {
|
||||
url = "github:nvim-telescope/telescope-fzf-native.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-telescope/telescope-ui-select.nvim" = {
|
||||
url = "github:nvim-telescope/telescope-ui-select.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring" = {
|
||||
url = "github:JoosepAlviste/nvim-ts-context-commentstring";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-preservim/nerdcommenter" = {
|
||||
url = "github:preservim/nerdcommenter";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-windwp/nvim-ts-autotag" = {
|
||||
url = "github:windwp/nvim-ts-autotag";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-rmagatti/auto-session" = {
|
||||
url = "github:rmagatti/auto-session";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-tree/nvim-web-devicons" = {
|
||||
url = "github:nvim-tree/nvim-web-devicons";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-nvim-tree/nvim-tree.lua" = {
|
||||
url = "github:nvim-tree/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-uga-rosa/ccc.nvim" = {
|
||||
url = "github:uga-rosa/ccc.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-voldikss/vim-floaterm" = {
|
||||
url = "github:voldikss/vim-floaterm";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lewis6991/gitsigns.nvim" = {
|
||||
url = "github:lewis6991/gitsigns.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-sindrets/diffview.nvim" = {
|
||||
url = "github:sindrets/diffview.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-RRethy/vim-illuminate" = {
|
||||
url = "github:RRethy/vim-illuminate";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim" = {
|
||||
url = "github:lukas-reineke/indent-blankline.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-lnc3l0t/glow.nvim" = {
|
||||
url = "github:lnc3l0t/glow.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-Almo7aya/openingh.nvim" = {
|
||||
url = "github:Almo7aya/openingh.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-tpope/vim-surround" = {
|
||||
url = "github:tpope/vim-surround";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-johmsalas/text-case.nvim" = {
|
||||
url = "github:johmsalas/text-case.nvim";
|
||||
flake = false;
|
||||
};
|
||||
"nvim_plugin-mbbill/undotree" = {
|
||||
url = "github:mbbill/undotree";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... } @ inputs:
|
||||
|
@ -140,8 +26,42 @@
|
|||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
nonFlakePluginPaths = {
|
||||
"nvim_plugin-nvim-treesitter/nvim-treesitter" = pkgs.vimPlugins.nvim-treesitter.withAllGrammars;
|
||||
lazyPath = pkgs.vimPlugins.lazy-nvim; # inputs."nvim_plugin-folke/lazy.nvim"
|
||||
# Plugins provided in nixpkgs, match the naming scheme above for keys
|
||||
nixPkgsPlugins = with pkgs.vimPlugins; {
|
||||
"nvim_plugin-folke/lazy.nvim" = lazyPath;
|
||||
"nvim_plugin-nvim-treesitter/nvim-treesitter" = nvim-treesitter.withAllGrammars;
|
||||
"nvim_plugin-nvim-lua/plenary.nvim" = plenary-nvim;
|
||||
"nvim_plugin-catppuccin/nvim" = catppuccin-nvim;
|
||||
"nvim_plugin-Pocco81/auto-save.nvim" = auto-save-nvim;
|
||||
"nvim_plugin-MunifTanjim/nui.nvim" = nui-nvim;
|
||||
"nvim_plugin-rcarriga/nvim-notify" = nvim-notify;
|
||||
"nvim_plugin-folke/noice.nvim" = noice-nvim;
|
||||
"nvim_plugin-nvim-lualine/lualine.nvim" = lualine-nvim;
|
||||
"nvim_plugin-folke/which-key.nvim" = which-key-nvim;
|
||||
"nvim_plugin-nvim-telescope/telescope.nvim" = telescope-nvim;
|
||||
"nvim_plugin-nvim-telescope/telescope-fzf-native.nvim" = telescope-fzf-native-nvim;
|
||||
"nvim_plugin-nvim-telescope/telescope-ui-select.nvim" = telescope-ui-select-nvim;
|
||||
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring" = nvim-ts-context-commentstring;
|
||||
"nvim_plugin-preservim/nerdcommenter" = nerdcommenter;
|
||||
"nvim_plugin-windwp/nvim-ts-autotag" = nvim-ts-autotag;
|
||||
"nvim_plugin-rmagatti/auto-session" = auto-session;
|
||||
"nvim_plugin-nvim-tree/nvim-web-devicons" = nvim-web-devicons;
|
||||
"nvim_plugin-nvim-tree/nvim-tree.lua" = nvim-tree-lua;
|
||||
"nvim_plugin-uga-rosa/ccc.nvim" = ccc-nvim;
|
||||
"nvim_plugin-voldikss/vim-floaterm" = vim-floaterm;
|
||||
"nvim_plugin-lewis6991/gitsigns.nvim" = gitsigns-nvim;
|
||||
"nvim_plugin-sindrets/diffview.nvim" = diffview-nvim;
|
||||
"nvim_plugin-RRethy/vim-illuminate" = vim-illuminate;
|
||||
"nvim_plugin-lukas-reineke/indent-blankline.nvim" = indent-blankline-nvim;
|
||||
"nvim_plugin-lnc3l0t/glow.nvim" = glow-nvim;
|
||||
"nvim_plugin-Almo7aya/openingh.nvim" = openingh-nvim;
|
||||
"nvim_plugin-tpope/vim-surround" = vim-surround;
|
||||
"nvim_plugin-johmsalas/text-case.nvim" = text-case-nvim;
|
||||
"nvim_plugin-mbbill/undotree" = undotree;
|
||||
"nvim_plugin-tpope/vim-sleuth" = vim-sleuth;
|
||||
"nvim_plugin-mfussenegger/nvim-lint" = nvim-lint;
|
||||
"nvim_plugin-stevearc/conform.nvim" = conform-nvim;
|
||||
};
|
||||
# This will be how we put any nix related stuff into our lua config
|
||||
luaNixGlobal = "NIX=" + lib.generators.toLua { multiline = false; indent = false; } ({
|
||||
|
@ -152,20 +72,28 @@
|
|||
{
|
||||
"${name}" = inputs.${name}.outPath;
|
||||
} // dirs)
|
||||
nonFlakePluginPaths
|
||||
nixPkgsPlugins
|
||||
(builtins.filter
|
||||
(n: builtins.substring 0 12 n == "nvim_plugin-")
|
||||
(builtins.attrNames inputs));
|
||||
});
|
||||
|
||||
runtimeDependencies = with pkgs; [
|
||||
# tools
|
||||
ripgrep # search
|
||||
fd # search
|
||||
fzf # search fuzzy
|
||||
# curl # http requests
|
||||
tree-sitter
|
||||
glow # markdown renderer
|
||||
# nodePackages.cspell
|
||||
# linters
|
||||
markdownlint-cli
|
||||
luajitPackages.luacheck
|
||||
biome # (t|s)j[x]
|
||||
# formatters
|
||||
stylua
|
||||
nodePackages.prettier
|
||||
# curl # http requests TODO
|
||||
# nodePackages.cspell TODO
|
||||
];
|
||||
in
|
||||
{
|
||||
|
@ -193,26 +121,24 @@
|
|||
# Set the LAZY env path to the nix store, see init.lua for how it is used
|
||||
"--set"
|
||||
"LAZY"
|
||||
"${inputs."nvim_plugin-folke/lazy.nvim"}"
|
||||
"${lazyPath}"
|
||||
# Don't use default directories to not collide with another neovim config
|
||||
# All things at runtime should be deletable since we are using nix to handle downloads and bins.
|
||||
"--set"
|
||||
"XDG_CONFIG_HOME"
|
||||
"/tmp/nvim_flaked/config"
|
||||
"/tmp/nvim_flaked.USR_TODO/config" # TODO
|
||||
"--set"
|
||||
"XDG_DATA_HOME"
|
||||
"/tmp/nvim_flaked/share"
|
||||
"/tmp/nvim_flaked.USR_TODO/share"
|
||||
"--set"
|
||||
"XDG_RUNTIME_DIR"
|
||||
"/tmp/nvim_flaked/run"
|
||||
"/tmp/nvim_flaked.USR_TODO/run"
|
||||
"--set"
|
||||
"XDG_STATE_HOME"
|
||||
"/tmp/nvim_flaked/state"
|
||||
"/tmp/nvim_flaked.USR_TODO/state"
|
||||
];
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue