diff options
| author | seth <[email protected]> | 2024-10-29 22:37:49 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-30 02:37:49 +0000 |
| commit | 310fdf8de53d98ddd3a56936c131186e25814f0f (patch) | |
| tree | f4265ab11de2262bacb2498cdc4661420a2df278 | |
| parent | 7ed0a2b87684eb32009944bd9eb8d7eaa9af0462 (diff) | |
use lz.n (#69)
* remove bufferline & some cmp sources
* factor things out of after/ folder
This is bad practice or something
* make sure ftdetect plugins aren't loaded multiple times
* use lz.n
* mini.pairs -> mini.surround
* flake: cleanup checks
* ftplugin: enforce spaces in nix files
42 files changed, 408 insertions, 424 deletions
diff --git a/after/plugin/globals.lua b/after/plugin/globals.lua deleted file mode 100644 index 5da584b..0000000 --- a/after/plugin/globals.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.g.mapleader = "," -vim.g.do_filetype_lua = { - "ts=typescript", -} diff --git a/after/plugin/keymaps.lua b/after/plugin/keymaps.lua deleted file mode 100644 index 9ff505a..0000000 --- a/after/plugin/keymaps.lua +++ /dev/null @@ -1,44 +0,0 @@ -local opts = { noremap = true, silent = true } -local set = function(mode, key, vimcmd) - vim.keymap.set(mode, key, vimcmd, opts) -end - -set("n", "<leader>t", function() - local files = require("mini.files") - if not files.close() then - files.open() - end -end) - -set({ "n", "o", "x" }, "s", function() - require("flash").jump() -end) - -for i = 1, 9 do - set("n", "<leader>" .. i, function() - vim.cmd("BufferLineGoToBuffer " .. i) - end) -end - -set("n", "<leader>q", function() - vim.cmd("BufferLinePickClose") -end) - -local diagnostic = vim.diagnostic -set("n", "<leader>e", diagnostic.open_float) -set("n", "[d", diagnostic.goto_prev) -set("n", "]d", diagnostic.goto_next) -set("n", "<leader>u", diagnostic.setloclist) -set("n", "<leader>ca", vim.lsp.buf.code_action) - -set("n", "<leader>f", function() - vim.cmd("Telescope") -end) - -set("n", "<leader>p", function() - vim.cmd("Trouble diagnostics toggle") -end) - -set("n", "<leader>z", function() - vim.cmd("FormatToggle") -end) @@ -18,24 +18,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "vim-tera": "vim-tera" - } - }, - "vim-tera": { - "flake": false, - "locked": { - "lastModified": 1716960700, - "narHash": "sha256-Zs3rRAwTp9iZc5oOkiR88j7LX7YmDrEELXt29h+j55w=", - "owner": "vkhitrin", - "repo": "vim-tera", - "rev": "235fb7e7e76dfffc0596fabc1e090880bce48844", - "type": "github" - }, - "original": { - "owner": "vkhitrin", - "repo": "vim-tera", - "type": "github" + "nixpkgs": "nixpkgs" } } }, @@ -3,18 +3,12 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - vim-tera = { - url = "github:vkhitrin/vim-tera"; - flake = false; - }; }; outputs = { self, nixpkgs, - vim-tera, }: let inherit (nixpkgs) lib; @@ -28,42 +22,43 @@ forAllSystems = lib.genAttrs systems; nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system}); + + date = + let + # YYYYMMDD + date = builtins.substring 0 8 self.lastModifiedDate; + # YYYY + year = builtins.substring 0 4 date; + # MM + month = builtins.substring 4 2 date; + # DD + day = builtins.substring 6 2 date; + in + builtins.concatStringsSep "-" [ + year + month + day + ]; + version = "0-unstable-${date}"; in { checks = forAllSystems ( system: let pkgs = nixpkgsFor.${system}; + + mkCheck = + name: deps: script: + pkgs.runCommand name { nativeBuildInputs = deps; } '' + ${script} + touch $out + ''; in { - check-format-and-lint = - pkgs.runCommand "check-format-and-lint" - { - nativeBuildInputs = [ - pkgs.actionlint - pkgs.nixfmt-rfc-style - pkgs.selene - pkgs.statix - ]; - } - '' - cd ${self} - - echo "running actionlint..." - actionlint ./.github/workflows/* - - echo "running nixfmt..." - nixfmt --check . - - echo "running selene...." - selene **/*.lua - - echo "running statix..." - statix check . - - touch $out - ''; - + actionlint = mkCheck "check-actionlint" [ pkgs.actionlint ] "actionlint ${./.github/workflows}/*"; + deadnix = mkCheck "check-deadnix" [ pkgs.deadnix ] "deadnix --fail ${self}"; + selene = mkCheck "check-selene" [ pkgs.selene ] "cd ${self} && selene ."; + statix = mkCheck "check-statix" [ pkgs.statix ] "statix check ${self}"; } ); @@ -99,43 +94,19 @@ let pkgs = nixpkgsFor.${system}; - dateFrom = - flake: - let - # YYYYMMDD - date = builtins.substring 0 8 flake.lastModifiedDate; - # YYYY - year = builtins.substring 0 4 date; - # MM - month = builtins.substring 4 2 date; - # DD - day = builtins.substring 6 2 date; - in - builtins.concatStringsSep "-" [ - year - month - day - ]; + ourPackages = lib.makeScope pkgs.newScope (final: { + getchvim = final.callPackage ./neovim.nix { }; + + getchoo-neovim-config = pkgs.vimUtils.buildVimPlugin { + pname = "getchoo-neovim-config"; + inherit version; + src = self; + }; + }); in { - getchvim = pkgs.callPackage (self + "/neovim.nix") { - inherit (self.packages.${system}) getchoo-neovim-config vim-tera; - }; - - getchoo-neovim-config = pkgs.vimUtils.buildVimPlugin { - pname = "getchoo-neovim-config"; - version = "0-unstable-" + dateFrom self; - - src = self; - }; - - vim-tera = pkgs.vimUtils.buildVimPlugin { - pname = "vim-tera"; - version = "0-unstable-" + dateFrom vim-tera; - src = vim-tera; - }; - + inherit (ourPackages) getchvim getchoo-neovim-config; default = self.packages.${system}.getchvim; } ); diff --git a/ftdetect/githubaction.lua b/ftdetect/githubaction.lua index a6e11cf..ca0e589 100644 --- a/ftdetect/githubaction.lua +++ b/ftdetect/githubaction.lua @@ -1,4 +1,9 @@ -- this allows `actionlint` to only yaml files that are actions +if vim.g.did_load_githubaction_plugin then + return +end + +vim.g.did_load_githubaction_plugin = true vim.filetype.add({ pattern = { [".*/.github/workflows/.*%.yml"] = "yaml.githubaction", diff --git a/ftdetect/just.lua b/ftdetect/just.lua index 4c7098a..e956caa 100644 --- a/ftdetect/just.lua +++ b/ftdetect/just.lua @@ -1,3 +1,8 @@ +if vim.g.did_load_just_plugin then + return +end + +vim.g.did_load_just_plugin = true vim.filetype.add({ filename = { ["justfile"] = "just", diff --git a/ftplugin/nix.lua b/ftplugin/nix.lua new file mode 100644 index 0000000..d75888d --- /dev/null +++ b/ftplugin/nix.lua @@ -0,0 +1,3 @@ +vim.opt.expandtab = true +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 diff --git a/lua/getchoo/init.lua b/lua/getchoo/init.lua index 2f72940..021333c 100644 --- a/lua/getchoo/init.lua +++ b/lua/getchoo/init.lua @@ -14,3 +14,7 @@ opt.wrap = true -- ui opt.mouse = "a" opt.showmode = false -- status line does this + +require("lz.n").load("getchoo/plugins") + +vim.cmd.colorscheme("catppuccin") diff --git a/lua/getchoo/plugins/catppuccin.lua b/lua/getchoo/plugins/catppuccin.lua new file mode 100644 index 0000000..18daf1f --- /dev/null +++ b/lua/getchoo/plugins/catppuccin.lua @@ -0,0 +1,36 @@ +local compile_path = vim.fn.stdpath("cache") .. "/catppuccin-nvim" + +return { + { + "catppuccin-nvim", + colorscheme = "catppuccin", + before = function() + vim.fn.mkdir(compile_path, "p") + vim.opt.runtimepath:append(compile_path) + end, + after = function() + require("catppuccin").setup({ + compile_path = compile_path, + flavour = "mocha", + integrations = { + cmp = true, + flash = true, + gitsigns = true, + indent_blankline = { + enabled = true, + }, + lsp_trouble = true, + native_lsp = { + enabled = true, + }, + neotree = true, + treesitter = true, + telescope = true, + which_key = true, + }, + + no_italic = true, + }) + end + } +} diff --git a/lua/getchoo/plugins/cmp.lua b/lua/getchoo/plugins/cmp.lua new file mode 100644 index 0000000..19f9150 --- /dev/null +++ b/lua/getchoo/plugins/cmp.lua @@ -0,0 +1,42 @@ +return { + { + "nvim-cmp", + lazy = false, + after = function() + local cmp = require("cmp") + + cmp.setup({ + completion = { + compleopt = "menu,menuone,insert", + }, + + mapping = { + ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + ["<C-b>"] = cmp.mapping.scroll_docs(-4), + ["<C-f>"] = cmp.mapping.scroll_docs(4), + ["<C-Space>"] = cmp.mapping.complete(), + ["<C-e>"] = cmp.mapping.abort(), + ["<CR>"] = cmp.mapping({ + i = function(fallback) + if cmp.visible() and cmp.get_active_entry() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) + else + fallback() + end + end, + + s = cmp.mapping.confirm({ select = true }), + c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), + }), + }, + + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "async_path" }, + { name = "buffer" }, + }), + }) + end + } +} diff --git a/lua/getchoo/plugins/crates.lua b/lua/getchoo/plugins/crates.lua new file mode 100644 index 0000000..62476c4 --- /dev/null +++ b/lua/getchoo/plugins/crates.lua @@ -0,0 +1,9 @@ +return { + { + "crates.nvim", + event = "BufReadPost Cargo.toml", + after = function() + require("crates").setup() + end + } +} diff --git a/lua/getchoo/plugins/fidget.lua b/lua/getchoo/plugins/fidget.lua new file mode 100644 index 0000000..11a1a4d --- /dev/null +++ b/lua/getchoo/plugins/fidget.lua @@ -0,0 +1,10 @@ +return { + { + "fidget.nvim", + -- https://github.com/LazyVim/LazyVim/blob/cb40a09538dc0c417a7ffbbacdbdec90be4a792c/lua/lazyvim/util/plugin.lua#L9 + event = require("getchoo.utils").lazy_file, + after = function() + require("fidget").setup() + end + } +} diff --git a/lua/getchoo/plugins/flash.lua b/lua/getchoo/plugins/flash.lua new file mode 100644 index 0000000..521cbcb --- /dev/null +++ b/lua/getchoo/plugins/flash.lua @@ -0,0 +1,11 @@ +return { + { + "flash.nvim", + event = "DeferredUIEnter", + keys = { + { + "f", function() require("flash").jump() end, mode = { "n", "o", "x" } + } + }, + } +} diff --git a/lua/getchoo/plugins/gitsigns.lua b/lua/getchoo/plugins/gitsigns.lua new file mode 100644 index 0000000..f63e5ce --- /dev/null +++ b/lua/getchoo/plugins/gitsigns.lua @@ -0,0 +1,9 @@ +return { + { + "gitsigns.nvim", + event = require("getchoo.utils").lazy_file, + after = function() + require("gitsigns").setup() + end, + } +} diff --git a/lua/getchoo/plugins/glow.lua b/lua/getchoo/plugins/glow.lua new file mode 100644 index 0000000..5758898 --- /dev/null +++ b/lua/getchoo/plugins/glow.lua @@ -0,0 +1,9 @@ +return { + { + "glow.nvim", + ft = "markdown", + after = function() + require("glow").setup() + end + } +} diff --git a/lua/getchoo/plugins/ibl.lua b/lua/getchoo/plugins/ibl.lua new file mode 100644 index 0000000..ae4481f --- /dev/null +++ b/lua/getchoo/plugins/ibl.lua @@ -0,0 +1,27 @@ +return { + { + "indent-blankline.nvim", + event = require("getchoo.utils").lazy_file, + after = function() + require("ibl").setup({ + exclude = { + filetypes = { + "help", + "Trouble", + "toggleterm", + }, + }, + + indent = { + char = "│", + tab_char = "│", + }, + + scope = { + -- Let mini.nvim handle this + enabled = false, + }, + }) + end + } +} diff --git a/lua/getchoo/plugins/lint.lua b/lua/getchoo/plugins/lint.lua new file mode 100644 index 0000000..3cebc5c --- /dev/null +++ b/lua/getchoo/plugins/lint.lua @@ -0,0 +1,22 @@ +return { + "nvim-lint", + event = require("getchoo.utils").lazy_file, + before = function() + vim.api.nvim_create_autocmd({ "BufWritePost" }, { + callback = function() + -- Run linters declared in linters_by_ft + require("lint").try_lint() + + -- Run these linters regardless of filetype + require("lint").try_lint("alex") + end, + }) + end, + after = function() + require("lint").linters_by_ft = { + githubaction = { "actionlint" }, + lua = { "selene" }, + nix = { "statix" }, + } + end +} diff --git a/plugin/lsp.lua b/lua/getchoo/plugins/lsp.lua index 5815574..2b2da52 100644 --- a/plugin/lsp.lua +++ b/lua/getchoo/plugins/lsp.lua @@ -1,8 +1,3 @@ -if vim.g.did_load_lsp_plugin then - return -end -vim.g.did_load_lsp_plugin = true - local lsp_servers = { astro = { binary = "astro-ls", @@ -33,7 +28,7 @@ local lsp_servers = { }, jsonls = { - binary = "vscode-json-language-server" + binary = "vscode-json-language-server", }, -- TODO: I WANT STYLUA BACK!! @@ -126,12 +121,37 @@ local setup = { capabilities = caps, } -for server, config in pairs(lsp_servers) do - local binary = config.binary or server - - local options = (config.extraOptions == nil) and setup or vim.tbl_extend("keep", config.extraOptions, setup) - if vim.fn.executable(binary) == 1 then - require("lspconfig")[server].setup(options) - end -end +return { + { + "lspformat.nvim", + command = "FormatToggle", + keys = { { "<leader>z", "<cmd>FormatToggle<cr>" } }, + after = function() + require("lsp-format").setup() + end + }, + { + "nvim-lspconfig", + event = require("getchoo.utils").lazy_file, + keys = { + { "<leader>e", vim.diagnostic.open_float }, + { "[d", vim.diagnostic.goto_prev }, + { "]d", vim.diagnostic.goto_next }, + { "<leader>u", vim.diagnostic.setloclist }, + { "<leader>ca", vim.lsp.buf.code_action } + }, + after = function() + local lspconfig = require("lspconfig") + + for server, config in pairs(lsp_servers) do + local binary = config.binary or server + local options = (config.extraOptions == nil) and setup or vim.tbl_extend("keep", config.extraOptions, setup) + + if vim.fn.executable(binary) == 1 then + lspconfig[server].setup(options) + end + end + end + } +} diff --git a/lua/getchoo/plugins/lualine.lua b/lua/getchoo/plugins/lualine.lua new file mode 100644 index 0000000..e5eb8a1 --- /dev/null +++ b/lua/getchoo/plugins/lualine.lua @@ -0,0 +1,14 @@ +return { + { + "lualine.nvim", + event = "DeferredUIEnter", + after = function() + require("lualine").setup({ + options = { + theme = "catppuccin", + }, + extensions = { "trouble" }, + }) + end + } +} diff --git a/lua/getchoo/plugins/mini.lua b/lua/getchoo/plugins/mini.lua new file mode 100644 index 0000000..263cc77 --- /dev/null +++ b/lua/getchoo/plugins/mini.lua @@ -0,0 +1,45 @@ +return { + { + "mini.nvim", + event = "DeferredUIEnter", + keys = { + { "<leader>t", function() + local files = require("mini.files") + if not files.close() then + files.open() + end + end + } + }, + before = function() + -- Disable indentscope in some files + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "Trouble", + "toggleterm", + }, + + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + end, + after = function() + require("mini.files").setup() + + local hipatterns = require("mini.hipatterns") + hipatterns.setup({ + highlighters = { + hex_color = hipatterns.gen_highlighter.hex_color(), + }, + }) + + require("mini.icons").setup() + require("mini.indentscope").setup({ + options = { try_as_border = true }, + }) + require("mini.surround").setup() + end, + } +} diff --git a/lua/getchoo/plugins/telescope.lua b/lua/getchoo/plugins/telescope.lua new file mode 100644 index 0000000..3887d4a --- /dev/null +++ b/lua/getchoo/plugins/telescope.lua @@ -0,0 +1,13 @@ +return { + { + "telescope.nvim", + keys = { + { "<leader>fb", "<cmd>Telescope buffers<cr>" }, + { "<leader>ff", "<cmd>Telescope find_files<cr>" }, + { "<leader>fg", "<cmd>Telescope live_grep<cr>" } + }, + after = function() + require("telescope").setup() + end + } +} diff --git a/lua/getchoo/plugins/treesitter.lua b/lua/getchoo/plugins/treesitter.lua new file mode 100644 index 0000000..b6857eb --- /dev/null +++ b/lua/getchoo/plugins/treesitter.lua @@ -0,0 +1,12 @@ +return { + "nvim-treesitter", + event = vim.tbl_extend("force", require("getchoo.utils").lazy_file, { "DeferredUIEnter" }), + after = function() + require("nvim-treesitter.configs").setup({ + auto_install = false, + + highlight = { enable = true }, + indent = { enable = true }, + }) + end +} diff --git a/lua/getchoo/plugins/trouble.lua b/lua/getchoo/plugins/trouble.lua new file mode 100644 index 0000000..2d3694b --- /dev/null +++ b/lua/getchoo/plugins/trouble.lua @@ -0,0 +1,12 @@ +return { + { + "trouble.nvim", + cmd = "Trouble", + keys = { + { "<leader>p", "<cmd>Trouble diagnostics toggle<cr>" } + }, + after = function() + require("trouble").setup() + end + } +} diff --git a/lua/getchoo/utils.lua b/lua/getchoo/utils.lua new file mode 100644 index 0000000..efb38c2 --- /dev/null +++ b/lua/getchoo/utils.lua @@ -0,0 +1,10 @@ +local M = {} + +M.set_keymap = function(mode, key, vimcmd) + local opts = { noremap = true, silent = true } + vim.keymap.set(mode, key, vimcmd, opts) +end + +M.lazy_file = { "BufReadPost", "BufNewFile", "BufWritePre" } + +return M @@ -1,82 +1,77 @@ { lib, - neovimUtils, - vimPlugins, - wrapNeovimUnstable, - neovim-unwrapped, actionlint, - getchoo-neovim-config, glow, + neovim-unwrapped, + neovimUtils, nil, nixfmt-rfc-style, nodePackages, - ripgrep, shellcheck, shfmt, statix, typos-lsp, - vim-tera, + vimPlugins, + wrapNeovimUnstable, + + getchoo-neovim-config, }: + let plugins = with vimPlugins; [ getchoo-neovim-config - # coding + # lazy loader + lz-n + + # Editing + flash-nvim + glow-nvim + mini-nvim + + nvim-treesitter.withAllGrammars + + # UI + catppuccin-nvim + indent-blankline-nvim + lualine-nvim + + # Coding nvim-cmp luasnip cmp-async-path cmp-buffer - cmp_luasnip cmp-nvim-lsp - cmp-rg crates-nvim gitsigns-nvim nvim-lint - - # editing - flash-nvim - glow-nvim - mini-nvim - telescope-nvim # dependent on > plenary-nvim - nvim-treesitter.withAllGrammars - - vim-tera - - # ui - bufferline-nvim # dependent on > - nvim-web-devicons - - catppuccin-nvim - indent-blankline-nvim - lualine-nvim - - # lsp + # LSP fidget-nvim - nvim-lspconfig lsp-format-nvim + nvim-lspconfig trouble-nvim ]; extraPackages = [ - glow # glow.nvim + # External programs + glow - ripgrep # cmp + # LSP + ## General + typos-lsp - # lsp + ## Language-specific nodePackages.bash-language-server shellcheck shfmt - nil nixfmt-rfc-style - typos-lsp - - ## linters + # Linters nodePackages.alex actionlint statix diff --git a/plugin/bufferline.lua b/plugin/bufferline.lua deleted file mode 100644 index b03ddff..0000000 --- a/plugin/bufferline.lua +++ /dev/null @@ -1,16 +0,0 @@ -if vim.g.did_load_bufferline_plugin then - return -end -vim.g.did_load_bufferline_plugin = true - -require("bufferline").setup({ - options = { - always_show_bufferline = false, - - diagnostics = "nvim_lsp", - - mode = "buffers", - numbers = "ordinal", - separator_style = "slant", - }, -}) diff --git a/plugin/catppuccin.lua b/plugin/catppuccin.lua deleted file mode 100644 index 79b84ec..0000000 --- a/plugin/catppuccin.lua +++ /dev/null @@ -1,33 +0,0 @@ -if vim.g.did_load_catppuccin_plugin then - return -end -vim.g.did_load_catppuccin_plugin = true - -local compile_path = vim.fn.stdpath("cache") .. "/catppuccin-nvim" -vim.fn.mkdir(compile_path, "p") -vim.opt.runtimepath:append(compile_path) - -require("catppuccin").setup({ - compile_path = compile_path, - flavour = "mocha", - integrations = { - cmp = true, - flash = true, - gitsigns = true, - indent_blankline = { - enabled = true, - }, - lsp_trouble = true, - native_lsp = { - enabled = true, - }, - neotree = true, - treesitter = true, - telescope = true, - which_key = true, - }, - - no_italic = true, -}) - -vim.cmd.colorscheme("catppuccin") diff --git a/plugin/cmp.lua b/plugin/cmp.lua deleted file mode 100644 index 10c750f..0000000 --- a/plugin/cmp.lua +++ /dev/null @@ -1,47 +0,0 @@ -if vim.g.did_load_cmp_plugin then - return -end -vim.g.did_load_cmp_plugin = true - -local cmp = require("cmp") - -cmp.setup({ - completion = { - compleopt = "menu,menuone,insert", - }, - - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - mapping = { - ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-b>"] = cmp.mapping.scroll_docs(-4), - ["<C-f>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete(), - ["<C-e>"] = cmp.mapping.abort(), - ["<CR>"] = cmp.mapping({ - i = function(fallback) - if cmp.visible() and cmp.get_active_entry() then - cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) - else - fallback() - end - end, - - s = cmp.mapping.confirm({ select = true }), - c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), - }), - }, - - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "async_path" }, - { name = "buffer" }, - { name = "rg" }, - }), -}) diff --git a/plugin/crates.lua b/plugin/crates.lua deleted file mode 100644 index a954320..0000000 --- a/plugin/crates.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_crates_plugin then - return -end -vim.g.did_load_crates_plugin = true - -require("crates").setup() diff --git a/plugin/fidget.lua b/plugin/fidget.lua deleted file mode 100644 index 59fbb0c..0000000 --- a/plugin/fidget.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_fidget_plugin then - return -end -vim.g.did_load_fidget_plugin = true - -require("fidget").setup() diff --git a/plugin/flash.lua b/plugin/flash.lua deleted file mode 100644 index f3e1c15..0000000 --- a/plugin/flash.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_flash_plugin then - return -end -vim.g.did_load_flash_plugin = true - -require("flash").setup() diff --git a/plugin/gitsigns.lua b/plugin/gitsigns.lua deleted file mode 100644 index 7f6f457..0000000 --- a/plugin/gitsigns.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_gitsigns_plugin then - return -end -vim.g.did_load_gitsigns_plugin = true - -require("gitsigns").setup() diff --git a/plugin/glow.lua b/plugin/glow.lua deleted file mode 100644 index 4e7f2d9..0000000 --- a/plugin/glow.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_glow_plugin then - return -end -vim.g.did_load_glow_plugin = true - -require("glow").setup() diff --git a/plugin/ibl.lua b/plugin/ibl.lua deleted file mode 100644 index 0d42c04..0000000 --- a/plugin/ibl.lua +++ /dev/null @@ -1,24 +0,0 @@ -if vim.g.did_load_ibl_plugin then - return -end -vim.g.did_load_ibl_plugin = true - -require("ibl").setup({ - exclude = { - filetypes = { - "help", - "Trouble", - "toggleterm", - }, - }, - - indent = { - char = "│", - tab_char = "│", - }, - - scope = { - -- Let mini.nvim handle this - enabled = false, - }, -}) diff --git a/plugin/lint.lua b/plugin/lint.lua deleted file mode 100644 index b7dba21..0000000 --- a/plugin/lint.lua +++ /dev/null @@ -1,20 +0,0 @@ -if vim.g.did_load_lint_plugin then - return -end -vim.g.did_load_lint_plugin = true - -require("lint").linters_by_ft = { - githubaction = { "actionlint" }, - lua = { "selene" }, - nix = { "statix" }, -} - -vim.api.nvim_create_autocmd({ "BufWritePost" }, { - callback = function() - -- Run linters declared in linters_by_ft - require("lint").try_lint() - - -- Run these linters regardless of filetype - require("lint").try_lint("alex") - end, -}) diff --git a/plugin/lsp-format.lua b/plugin/lsp-format.lua deleted file mode 100644 index e21bdfd..0000000 --- a/plugin/lsp-format.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_lsp_format_plugin then - return -end -vim.g.did_load_lsp_format_plugin = true - -require("lsp-format").setup() diff --git a/plugin/lualine.lua b/plugin/lualine.lua deleted file mode 100644 index 603693d..0000000 --- a/plugin/lualine.lua +++ /dev/null @@ -1,11 +0,0 @@ -if vim.g.did_load_lualine_plugin then - return -end -vim.g.did_load_lualine_plugin = true - -require("lualine").setup({ - options = { - theme = "catppuccin", - }, - extensions = { "trouble" }, -}) diff --git a/plugin/mini.lua b/plugin/mini.lua deleted file mode 100644 index ebcbf78..0000000 --- a/plugin/mini.lua +++ /dev/null @@ -1,29 +0,0 @@ -if vim.g.did_load_mini_plugin then - return -end -vim.g.did_load_mini_plugin = true - -local hipatterns = require("mini.hipatterns") - -require("mini.files").setup() -hipatterns.setup({ - highlighters = { - hex_color = hipatterns.gen_highlighter.hex_color(), - }, -}) -require("mini.indentscope").setup({ - options = { try_as_border = true }, -}) -require("mini.pairs").setup() - -vim.api.nvim_create_autocmd("FileType", { - pattern = { - "help", - "Trouble", - "toggleterm", - }, - - callback = function() - vim.b.miniindentscope_disable = true - end, -}) diff --git a/plugin/telescope.lua b/plugin/telescope.lua deleted file mode 100644 index d50d742..0000000 --- a/plugin/telescope.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_telescope_plugin then - return -end -vim.g.did_load_telescope_plugin = true - -require("telescope").setup() diff --git a/plugin/treesitter.lua b/plugin/treesitter.lua deleted file mode 100644 index 4668fe8..0000000 --- a/plugin/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -if vim.g.did_load_treesitter_plugin then - return -end -vim.g.did_load_treesitter_plugin = true - -require("nvim-treesitter.configs").setup({ - auto_install = false, - - highlight = { enable = true }, - indent = { enable = true }, -}) diff --git a/plugin/trouble.lua b/plugin/trouble.lua deleted file mode 100644 index e1e7768..0000000 --- a/plugin/trouble.lua +++ /dev/null @@ -1,6 +0,0 @@ -if vim.g.did_load_trouble_plugin then - return -end -vim.g.did_load_trouble_plugin = true - -require("trouble").setup() diff --git a/selene.toml b/selene.toml index 98b6ac7..23b4393 100644 --- a/selene.toml +++ b/selene.toml @@ -1 +1,5 @@ std = "nvim" + +[lints] +# lz.n uses this for its plugin spec +mixed_table = "allow" |
