From 586f89ba76ed6528ad69e1aef69380b9cb68c82b Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Wed, 14 Aug 2024 08:47:08 +0930 Subject: [PATCH] feat: remove noice and switch to tokyo-night --- .config/alacritty/alacritty.toml | 2 +- .config/alacritty/themes/tokyo-night.toml | 29 +++ .config/aliasrc | 3 +- .config/nvim/lua/tovi/plugins/colorscheme.lua | 15 +- .config/nvim/lua/tovi/plugins/linting.lua | 1 + .config/nvim/lua/tovi/plugins/lualine.lua | 3 +- .config/nvim/lua/tovi/plugins/noice.lua | 55 ------ .config/nvim/lua/tovi/plugins/nvim-cmp.lua | 167 +++++++++--------- .tmux.conf | 11 +- .zshrc | 4 +- 10 files changed, 140 insertions(+), 150 deletions(-) create mode 100644 .config/alacritty/themes/tokyo-night.toml delete mode 100644 .config/nvim/lua/tovi/plugins/noice.lua diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 223ce39..41c1e4d 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ import = [ - "~/.config/alacritty/themes/kanagawa_wave.toml" + "~/.config/alacritty/themes/tokyo-night.toml" ] [env] diff --git a/.config/alacritty/themes/tokyo-night.toml b/.config/alacritty/themes/tokyo-night.toml new file mode 100644 index 0000000..0642a90 --- /dev/null +++ b/.config/alacritty/themes/tokyo-night.toml @@ -0,0 +1,29 @@ +# Colors (Tokyo Night) +# Source https//github.com/zatchheems/tokyo-night-alacritty-theme + +# Default colors +[colors.primary] +background = '#1a1b26' +foreground = '#a9b1d6' + +# Normal colors +[colors.normal] +black = '#32344a' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#ad8ee6' +cyan = '#449dab' +white = '#787c99' + +# Bright colors +[colors.bright] +black = '#444b6a' +red = '#ff7a93' +green = '#b9f27c' +yellow = '#ff9e64' +blue = '#7da6ff' +magenta = '#bb9af7' +cyan = '#0db9d7' +white = '#acb0d0' diff --git a/.config/aliasrc b/.config/aliasrc index 615360f..015d37e 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -11,7 +11,6 @@ alias va='nvim ~/.config/aliasrc && source ~/.zshrc' alias sz='source ~/.zshrc' alias c="xclip -selection clipboard" alias v="xclip -selection clipboard -o" -alias lf="lfcd" alias ducks='du -cks * | sort -rn | head' # Docker @@ -48,3 +47,5 @@ alias jack-phpunit="dce app-fpm ./vendor/bin/phpunit" alias jack-subscription-artisan="dce subscription-fpm ./artisan" alias jack-subscription-paratest="dce subscription-fpm ./test" alias jack-subscription-phpunit="dce subscription-fpm ./vendor/bin/phpunit" + +alias fd="fdfind" diff --git a/.config/nvim/lua/tovi/plugins/colorscheme.lua b/.config/nvim/lua/tovi/plugins/colorscheme.lua index 6e4e562..a3fb9b0 100644 --- a/.config/nvim/lua/tovi/plugins/colorscheme.lua +++ b/.config/nvim/lua/tovi/plugins/colorscheme.lua @@ -53,9 +53,10 @@ return { }, }) - -- vim.cmd("colorscheme catppuccin") + vim.cmd("colorscheme catppuccin") end }, + { "ellisonleao/gruvbox.nvim", enabled = false, @@ -65,6 +66,7 @@ return { vim.cmd("colorscheme gruvbox") end, }, + { "rebelot/kanagawa.nvim", priority = 1000 , @@ -96,7 +98,16 @@ return { }) -- setup must be called before loading - vim.cmd("colorscheme kanagawa") + -- vim.cmd("colorscheme kanagawa") end }, + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + config = function () + require('tokyonight').setup() + vim.cmd("colorscheme kanagawa") + end + } } diff --git a/.config/nvim/lua/tovi/plugins/linting.lua b/.config/nvim/lua/tovi/plugins/linting.lua index e5f6d60..d92b296 100644 --- a/.config/nvim/lua/tovi/plugins/linting.lua +++ b/.config/nvim/lua/tovi/plugins/linting.lua @@ -10,6 +10,7 @@ return { } lint.linters.phpcs = { + name = 'phpcs', cmd = 'phpcs', stdin = true, args = { diff --git a/.config/nvim/lua/tovi/plugins/lualine.lua b/.config/nvim/lua/tovi/plugins/lualine.lua index 0f090fc..c8d8f3f 100644 --- a/.config/nvim/lua/tovi/plugins/lualine.lua +++ b/.config/nvim/lua/tovi/plugins/lualine.lua @@ -19,9 +19,10 @@ return { lualine.setup({ options = { - theme = "kanagawa", + theme = "tokyonight", component_separators = { left = "", right = "" }, section_separators = { left = "", right = "" }, + globalstatus = true, }, sections = { lualine_b = { diff --git a/.config/nvim/lua/tovi/plugins/noice.lua b/.config/nvim/lua/tovi/plugins/noice.lua deleted file mode 100644 index 926addc..0000000 --- a/.config/nvim/lua/tovi/plugins/noice.lua +++ /dev/null @@ -1,55 +0,0 @@ -return { - "folke/noice.nvim", - event = "VeryLazy", - dependencies = { - "MunifTanjim/nui.nvim", - "rcarriga/nvim-notify", - }, - opts = { - routes = { - { - filter = { - event = "msg_show", - kind = "", - find = "written", - }, - opts = { skip = true }, - }, - { - filter = { - event = "msg_show", - kind = "", - find = "fewer line", - }, - opts = { skip = true }, - }, - { - filter = { - event = "msg_show", - kind = "", - find = "more line", - }, - opts = { skip = true }, - }, - { - filter = { - event = "msg_show", - kind = "search_count", - }, - opts = { skip = true }, - }, - }, - views = { - cmdline_popup = { - border = { - style = "none", - padding = { 2, 3 }, - }, - filter_options = {}, - win_options = { - winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder", - }, - }, - }, - }, -} diff --git a/.config/nvim/lua/tovi/plugins/nvim-cmp.lua b/.config/nvim/lua/tovi/plugins/nvim-cmp.lua index eaf042d..b3c1406 100644 --- a/.config/nvim/lua/tovi/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/tovi/plugins/nvim-cmp.lua @@ -1,90 +1,91 @@ return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - -- Snippet Engine & its associated nvim-cmp source - { - "L3MON4D3/LuaSnip", - build = (function() - if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then - return - end - return "make install_jsregexp" - end)(), - dependencies = { - { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - }, - }, - "saadparwaiz1/cmp_luasnip", + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + { + "L3MON4D3/LuaSnip", + build = (function() + if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then + return + end + return "make install_jsregexp" + end)(), + dependencies = { + { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + }, + }, + "saadparwaiz1/cmp_luasnip", - "onsails/lspkind.nvim", - "kristijanhusak/vim-dadbod-completion", + "onsails/lspkind.nvim", + "kristijanhusak/vim-dadbod-completion", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-nvim-lsp-signature-help", - }, - config = function() - -- See `:help cmp` - local cmp = require("cmp") - local luasnip = require("luasnip") - local lspkind = require("lspkind") - luasnip.config.setup({}) + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lsp-signature-help", + }, + config = function() + -- See `:help cmp` + local cmp = require("cmp") + local luasnip = require("luasnip") + local lspkind = require("lspkind") + luasnip.config.setup({}) - cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { completeopt = "menu,menuone,noinsert", }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.complete({}), - [""] = cmp.mapping(function() - if luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end, { "i", "s" }), - [""] = cmp.mapping(function() - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - end - end, { "i", "s" }), - }), - sources = { - { name = "nvim_lsp" }, - -- { name = "nvim_lsp_signature_help" }, -- TODO: Get this working so hover() doesnt open twice - { name = "luasnip" }, - { name = "buffer" }, - { name = "path" }, - { name = "vim-dadbod-completion" }, - }, - formatting = { - format = lspkind.cmp_format({ - mode = "symbol_text", - menu = { - nvim_lua = "[API]", - nvim_lsp = "[LSP]", - luasnip = "[SNIP]", - vim_dadbod_completion = "[DBUI]", - path = "[PATH]", - buffer = "[BUFF]", - }, - }), - }, - }) - end, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.complete({}), + [""] = cmp.mapping(function() + if luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + end + end, { "i", "s" }), + [""] = cmp.mapping(function() + if luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + end + end, { "i", "s" }), + }), + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + { name = "vim-dadbod-completion" }, + }, + formatting = { + expandable_indicator = true, + fields = { "abbr", "kind", "menu" }, + format = lspkind.cmp_format({ + mode = "symbol_text", + menu = { + nvim_lua = "[API]", + nvim_lsp = "[LSP]", + luasnip = "[SNIP]", + vim_dadbod_completion = "[DBUI]", + path = "[PATH]", + buffer = "[BUFF]", + }, + }), + }, + }) + end, } diff --git a/.tmux.conf b/.tmux.conf index 829d1f8..06c45f8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -65,19 +65,18 @@ bind-key -r f run-shell "tmux neww ~/.local/bin/tmux-sessionizer" set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'Nybkox/tmux-kanagawa' +set -g @plugin "janoamaral/tokyo-night-tmux" +set -g @tokyo-night-tmux_window_id_style digital -set -g @kanagawa-show-powerline true - -set -g @kanagawa-theme 'wave' +# set -g @plugin 'Nybkox/tmux-kanagawa' +# set -g @kanagawa-show-powerline true +# set -g @kanagawa-theme 'wave' # set -g @plugin 'egel/tmux-gruvbox' # set -g @tmux-gruvbox 'dark' # or 'light' # set -g @plugin 'catppuccin/tmux' -# # set -g @catppuccin_flavour 'mocha' -# # set -g @catppuccin_status_left_separator "" # set -g @catppuccin_window_middle_separator " " # set -g @catppuccin_status_modules_right "application session directory date_time" diff --git a/.zshrc b/.zshrc index 3e801df..cd0bbed 100644 --- a/.zshrc +++ b/.zshrc @@ -103,7 +103,9 @@ source ~/.config/aliasrc # Source fzf for Ctrl+r source <(fzf --zsh) -. "$HOME/.cargo/env" +if [ -f "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi # Speed debugging # zprof