diff --git a/.gitignore b/.gitignore index 9e51286..12a2448 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# secrets .gitsecret/keys/random_seed !*.secret modules/secrets.nix + +# Generated by nix-pre-commit-hooks +/.pre-commit-config.yaml diff --git a/modules/neovim/.stylua.toml b/.stylua.toml similarity index 100% rename from modules/neovim/.stylua.toml rename to .stylua.toml diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..2962453 --- /dev/null +++ b/default.nix @@ -0,0 +1,14 @@ +let + nix-pre-commit-hooks = + import (builtins.fetchTarball + "https://github.com/cachix/pre-commit-hooks.nix/tarball/master"); +in { + pre-commit-check = nix-pre-commit-hooks.run { + src = ./.; + hooks = { + alejandra.enable = true; + shellcheck.enable = true; + stylua.enable = true; + }; + }; +} diff --git a/modules/neovim/after/plugin/colorizer.lua b/modules/neovim/after/plugin/colorizer.lua index b5fbbf3..2e6dc3b 100644 --- a/modules/neovim/after/plugin/colorizer.lua +++ b/modules/neovim/after/plugin/colorizer.lua @@ -1,5 +1,7 @@ local present, colorizer = pcall(require, "colorizer") -if not present then return end +if not present then + return +end colorizer.setup({ user_default_options = { diff --git a/modules/neovim/after/plugin/indent_blankline.lua b/modules/neovim/after/plugin/indent_blankline.lua index e494168..ba4c754 100644 --- a/modules/neovim/after/plugin/indent_blankline.lua +++ b/modules/neovim/after/plugin/indent_blankline.lua @@ -1,5 +1,7 @@ local present, indent_blankline = pcall(require, "indent_blankline") -if not present then return end +if not present then + return +end indent_blankline.setup({ space_char_blankline = " ", diff --git a/modules/neovim/after/plugin/lsp.lua b/modules/neovim/after/plugin/lsp.lua index 552a447..4ddf96f 100644 --- a/modules/neovim/after/plugin/lsp.lua +++ b/modules/neovim/after/plugin/lsp.lua @@ -28,6 +28,10 @@ local feedkey = function(key, mode) ) end +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "double", +}) + cmp.setup({ snippet = { expand = function(args) diff --git a/modules/neovim/lazy-lock.json b/modules/neovim/lazy-lock.json index db7066b..712a6f6 100644 --- a/modules/neovim/lazy-lock.json +++ b/modules/neovim/lazy-lock.json @@ -13,7 +13,6 @@ "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, "copilot.lua": { "branch": "master", "commit": "a54e7b11a2c6efc9ddd3f42e56cf7d9eed1a9683" }, "dressing.nvim": { "branch": "master", "commit": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe" }, - "easypick.nvim": { "branch": "main", "commit": "3f6af7b34eca30b81a8090ea6e5aa56212f8e746" }, "editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" }, "feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" }, "fidget.nvim": { "branch": "main", "commit": "9dc6d15fdb877b2fb09ea0ba2dfde9beccb5965a" }, @@ -42,6 +41,7 @@ "nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" }, "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-web-devicons": { "branch": "master", "commit": "ade34ca7d19543904b28b903e606be8930fb9ee3" }, + "octo.nvim": { "branch": "master", "commit": "7900dc0cd37e7bb5d4175a37c9c4c3dfb94a1f7b" }, "playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" }, "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, diff --git a/modules/wezterm/.stylua.toml b/modules/wezterm/.stylua.toml deleted file mode 100644 index 4d49284..0000000 --- a/modules/wezterm/.stylua.toml +++ /dev/null @@ -1,7 +0,0 @@ -column_width = 80 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -collapse_simple_statement = "Never" -call_parentheses = "Always" diff --git a/shell.nix b/shell.nix index b63baf7..c7a15d3 100644 --- a/shell.nix +++ b/shell.nix @@ -7,4 +7,7 @@ in git-secret just ]; + shellHook = '' + ${(import ./default.nix).pre-commit-check.shellHook} + ''; }