From 3e114e9d063541f03ce1cb85cc8c2077bf273124 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Thu, 5 Dec 2024 23:26:22 +0000 Subject: [PATCH] copied changes manually to fix nix config push issue --- dot_config/alacritty/alacritty.toml | 31 ++++++++ dot_config/alacritty/tokyo-night.toml | 23 ++++++ dot_config/hypr/hyprland.conf | 2 +- dot_config/hypr/variables.conf | 10 ++- dot_config/just/justfile | 4 + dot_config/kitty/config/window.conf | 3 +- dot_config/nushell/completions/nu_scripts.nu | 5 ++ dot_config/nushell/path.env | 5 +- dot_config/nushell/utils.nu | 8 ++ dot_config/nvim/lua/config/keys.lua | 77 ++++++++++++++++++++ dot_config/nvim/lua/plugins/extras.lua | 2 + dot_config/nvim/lua/plugins/lsp.lua | 1 - dot_config/nvim/lua/plugins/ui.lua | 3 + dot_config/nvim/lua/plugins/utils.lua | 36 +++++---- 14 files changed, 186 insertions(+), 24 deletions(-) create mode 100644 dot_config/alacritty/alacritty.toml create mode 100644 dot_config/alacritty/tokyo-night.toml create mode 100644 dot_config/just/justfile diff --git a/dot_config/alacritty/alacritty.toml b/dot_config/alacritty/alacritty.toml new file mode 100644 index 0000000..48a0e25 --- /dev/null +++ b/dot_config/alacritty/alacritty.toml @@ -0,0 +1,31 @@ +[general] +import = ["~/.config/alacritty/tokyo-night.toml"] + +[font] +normal = { family = "MonaspiceNeNerdFontMono", style = "Regular" } +size = 16.0 + +[cursor] +style = "Beam" +vi_mode_style = { shape = "Block", blinking = "Off" } +unfocused_hollow = true + +[terminal.shell] +program = "/usr/bin/env" +args = ["nu"] + +[mouse] +hide_when_typing = true + +[keyboard] +bindings = [ + { action = "CreateNewWindow", key = "N", mods = "Alt" }, + { action = "CreateNewWindow", key = "N", mods = "Alt" }, + { action = "CreateNewTab", key = "T", mods = "Alt" }, + { action = "SelectNextTab", key = "K", mods = "Alt" }, + { action = "SelectNextTab", key = "ArrowUp", mods = "Alt" }, + { action = "SelectPreviousTab", key = "J", mods = "Alt" }, + { action = "SelectPreviousTab", key = "ArrowDown", mods = "Alt" }, + { action = "CopySelection", key = "C", mods = "Control|Shift" }, + { action = "PasteSelection", key = "V", mods = "Control|Shift" }, +] diff --git a/dot_config/alacritty/tokyo-night.toml b/dot_config/alacritty/tokyo-night.toml new file mode 100644 index 0000000..08940c9 --- /dev/null +++ b/dot_config/alacritty/tokyo-night.toml @@ -0,0 +1,23 @@ +[colors.bright] +black = "#444b6a" +blue = "#7da6ff" +cyan = "#0db9d7" +green = "#b9f27c" +magenta = "#bb9af7" +red = "#ff7a93" +white = "#acb0d0" +yellow = "#ff9e64" + +[colors.normal] +black = "#32344a" +blue = "#7aa2f7" +cyan = "#449dab" +green = "#9ece6a" +magenta = "#ad8ee6" +red = "#f7768e" +white = "#787c99" +yellow = "#e0af68" + +[colors.primary] +background = "#1a1b26" +foreground = "#a9b1d6" diff --git a/dot_config/hypr/hyprland.conf b/dot_config/hypr/hyprland.conf index 0f3ed0e..e2a9128 100644 --- a/dot_config/hypr/hyprland.conf +++ b/dot_config/hypr/hyprland.conf @@ -22,5 +22,5 @@ source = inputs.conf source = appearance.conf exec-once = pueued -d -exec-once = waybar exec-once = hyprpaper +exec-once = sleep 0.5s && waybar diff --git a/dot_config/hypr/variables.conf b/dot_config/hypr/variables.conf index 6674c75..345f7f1 100644 --- a/dot_config/hypr/variables.conf +++ b/dot_config/hypr/variables.conf @@ -26,10 +26,12 @@ decoration { vibrancy = 0.1696 } - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } } animations { diff --git a/dot_config/just/justfile b/dot_config/just/justfile new file mode 100644 index 0000000..0b312fe --- /dev/null +++ b/dot_config/just/justfile @@ -0,0 +1,4 @@ +mod? nix "~/.config/nix" + +default: + @just -g --list diff --git a/dot_config/kitty/config/window.conf b/dot_config/kitty/config/window.conf index 948b26c..19ca580 100644 --- a/dot_config/kitty/config/window.conf +++ b/dot_config/kitty/config/window.conf @@ -1,5 +1,4 @@ -hide_window_decorations yes enabled_layouts Grid, Stack, Splits, Horizontal, Vertical, Fat, Tall tab_bar_style powerline tab_powerline_style slanted -# tab_activity_symbol "󰜎 " +tab_activity_symbol "󰜎 " diff --git a/dot_config/nushell/completions/nu_scripts.nu b/dot_config/nushell/completions/nu_scripts.nu index da3d548..a816f8e 100644 --- a/dot_config/nushell/completions/nu_scripts.nu +++ b/dot_config/nushell/completions/nu_scripts.nu @@ -7,16 +7,21 @@ source ~/.config/nushell/nu_scripts/custom-completions/flutter/flutter-completio source ~/.config/nushell/nu_scripts/custom-completions/gh/gh-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/git/git-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/glow/glow-completions.nu +source ~/.config/nushell/nu_scripts/custom-completions/just/just-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/man/man-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/mix/mix-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/nano/nano-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/nix/nix-completions.nu +source ~/.config/nushell/nu_scripts/custom-completions/pass/pass-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/poetry/poetry-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/pre-commit/pre-commit-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/pytest/pytest-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/rg/rg-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/rustup/rustup-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/rye/rye-completions.nu +source ~/.config/nushell/nu_scripts/custom-completions/ssh/ssh-completions.nu +source ~/.config/nushell/nu_scripts/custom-completions/tar/tar-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/tealdeer/tldr-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/vscode/vscode-completions.nu +source ~/.config/nushell/nu_scripts/custom-completions/winget/winget-completions.nu source ~/.config/nushell/nu_scripts/custom-completions/zellij/zellij-completions.nu diff --git a/dot_config/nushell/path.env b/dot_config/nushell/path.env index e476644..631299f 100644 --- a/dot_config/nushell/path.env +++ b/dot_config/nushell/path.env @@ -1,6 +1,7 @@ +~/.local/bin +~/.cargo/bin ~/.poetry/bin ~/.ghcup/bin -~/.local/bin -/opt/miniconda3/bin ~/.nix-profile/bin /nix/var/nix/profiles/default/bin +/opt/miniconda3/bin diff --git a/dot_config/nushell/utils.nu b/dot_config/nushell/utils.nu index 7d0152a..be542e0 100644 --- a/dot_config/nushell/utils.nu +++ b/dot_config/nushell/utils.nu @@ -40,3 +40,11 @@ export def 'build-plugins' [] { register-plugins } +export def 'install-default-plugins' [] { + [ nu_plugin_inc + nu_plugin_polars + # nu_plugin_gstat + nu_plugin_formats + nu_plugin_query + ] | each { cargo install $in --locked } | ignore +} diff --git a/dot_config/nvim/lua/config/keys.lua b/dot_config/nvim/lua/config/keys.lua index e7dc190..55a356f 100644 --- a/dot_config/nvim/lua/config/keys.lua +++ b/dot_config/nvim/lua/config/keys.lua @@ -9,6 +9,7 @@ return { { "t", group = "[T]ree" }, { "o", group = "[O]verseer" }, { "h", group = "[H]arpoon" }, + { "x", group = "[X] Trouble" }, { "|", group = "[|] Copilot" }, }, copilot = { @@ -263,4 +264,80 @@ return { }, } end, + todo_comments = { + { + "]t", + function() + require("todo-comments").jump_next() + end, + desc = "Next Todo Comment", + }, + { + "[t", + function() + require("todo-comments").jump_prev() + end, + desc = "Previous Todo Comment", + }, + { "xt", "Trouble todo toggle", desc = "Todo" }, + { + "xT", + "Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}", + desc = "Todo/Fix/Fixme", + }, + { "st", "TodoTelescope", desc = "Todo" }, + { + "sT", + "TodoTelescope keywords=TODO,FIX,FIXME", + desc = "Todo/Fix/Fixme", + }, + }, + trouble = { + { "xx", "Trouble diagnostics toggle", desc = "Diagnostics" }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics", + }, + { "cs", "Trouble symbols toggle", desc = "Symbols" }, + { + "cS", + "Trouble lsp toggle", + desc = "LSP references/definitions/... (Trouble)", + }, + { "xL", "Trouble loclist toggle", desc = "Location List" }, + { "xQ", "Trouble qflist toggle", desc = "Quickfix List" }, + { + "[q", + function() + if require("trouble").is_open() then + require("trouble").prev({ skip_groups = true, jump = true }) + else + local ok, err = pcall(vim.cmd.cprev) + if not ok then + vim.notify(err, vim.log.levels.ERROR) + end + end + end, + desc = "Previous Trouble/Quickfix Item", + }, + { + "]q", + function() + if require("trouble").is_open() then + require("trouble").next({ skip_groups = true, jump = true }) + else + local ok, err = pcall(vim.cmd.cnext) + if not ok then + if err then + vim.notify(err, vim.log.levels.ERROR) + else + vim.notify("An error occured but returned nil!", vim.log.levels.ERROR) + end + end + end + end, + desc = "Next Trouble/Quickfix Item", + }, + }, } diff --git a/dot_config/nvim/lua/plugins/extras.lua b/dot_config/nvim/lua/plugins/extras.lua index e498da3..2732e71 100644 --- a/dot_config/nvim/lua/plugins/extras.lua +++ b/dot_config/nvim/lua/plugins/extras.lua @@ -34,6 +34,8 @@ return { -- Non programming quality of life utilities go here "echasnovski/mini.nvim", "nvim-tree/nvim-web-devicons", }, + ---@module 'render-markdown' + ---@type render.md.UserConfig }, { -- A cheatsheet will always be useful until im a bit more familiar with vim "sudormrfbin/cheatsheet.nvim", diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua index 91af45d..467cd4e 100644 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ b/dot_config/nvim/lua/plugins/lsp.lua @@ -231,7 +231,6 @@ return { -- LSP Config should be a standalone function, hence this module end, }, -- Finally: add language and filetype specific plugins - { "LhKipp/nvim-nu", ft = "nu" }, { "fladson/vim-kitty", ft = "kitty" }, { "scallop-lang/vim-scallop", ft = "scallop" }, } diff --git a/dot_config/nvim/lua/plugins/ui.lua b/dot_config/nvim/lua/plugins/ui.lua index 2da732a..98e09dd 100644 --- a/dot_config/nvim/lua/plugins/ui.lua +++ b/dot_config/nvim/lua/plugins/ui.lua @@ -7,6 +7,7 @@ return { -- UI components and other visual elements are declared here vim.cmd.colorscheme("tokyonight-night") end, }, + { "MunifTanjim/nui.nvim", lazy = true }, { -- Useful plugin to show you pending keybinds. "folke/which-key.nvim", event = "VimEnter", @@ -79,6 +80,7 @@ return { -- UI components and other visual elements are declared here end, 5) end, }, + -- Modular, configurable status bar { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, @@ -142,6 +144,7 @@ return { -- UI components and other visual elements are declared here event = "VeryLazy", dependencies = { "zbirenbaum/copilot.lua" }, }, + -- Assistant for refreshers on vim motions { "tris203/precognition.nvim", keys = require("config.keys").precognition, diff --git a/dot_config/nvim/lua/plugins/utils.lua b/dot_config/nvim/lua/plugins/utils.lua index 911bb17..908806f 100644 --- a/dot_config/nvim/lua/plugins/utils.lua +++ b/dot_config/nvim/lua/plugins/utils.lua @@ -7,7 +7,8 @@ return { -- General programming utilities go here override = function(root_dir, library) if root_dir:find( - os.getenv("XDG_CONFIG_HOME") .. "/nix/home-manager/dotfiles/.config/nvim/", + os.getenv("XDG_CONFIG_HOME") + .. "/nix/home-manager/core/dotfiles/dot_config/nvim/", 1, true ) == 1 @@ -20,11 +21,24 @@ return { -- General programming utilities go here }, -- Privilege escalation plugin { "lambdalisue/suda.vim", event = "VeryLazy" }, + { + "folke/trouble.nvim", + cmd = { "Trouble" }, + opts = { + modes = { + lsp = { + win = { position = "right" }, + }, + }, + }, + keys = require("config.keys").trouble, + }, { "folke/todo-comments.nvim", + cmd = { "TodoTrouble", "TodoTelescope" }, event = "VimEnter", dependencies = { "nvim-lua/plenary.nvim" }, - opts = { signs = false }, + keys = require("config.keys").todo_comments, }, "tpope/vim-fugitive", -- Also want to add fugitive, since it's apparently a great git plugin "jlfwong/vim-mercenary", -- Mercenary is the mercurial equivalent of fugitive @@ -60,8 +74,9 @@ return { -- General programming utilities go here keys = require("config.keys").harpoon, }, -- Snippets - { "SirVer/ultisnips", events = "VeryLazy" }, - { "honza/vim-snippets", events = "VeryLazy" }, + "SirVer/ultisnips", + "honza/vim-snippets", + "rafamadriz/friendly-snippets", { -- Package and devenv plugins "danymat/neogen", event = "VimEnter", @@ -198,24 +213,17 @@ return { -- General programming utilities go here build = ":TSUpdate", opts = { ensure_installed = { "bash", "c", "html", "lua", "markdown", "vim", "vimdoc" }, - -- Autoinstall languages that are not installed auto_install = true, highlight = { enable = true }, indent = { enable = true }, }, config = function(_, opts) - -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - ---@diagnostic disable-next-line: missing-fields require("nvim-treesitter.configs").setup(opts) - - -- There are additional nvim-treesitter modules that you can use to interact - -- with nvim-treesitter. You should go explore a few and see what interests you: - -- - -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` - -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context - -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects end, + dependencies = { + { "nushell/tree-sitter-nu", build = ":TSUpdate nu" }, + }, }, { -- Undo tree "mbbill/undotree",