diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index da30d14..223ce39 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ import = [ - "~/.config/alacritty/themes/gruvbox_dark.toml" + "~/.config/alacritty/themes/kanagawa_wave.toml" ] [env] diff --git a/.config/alacritty/themes/kanagawa_dragon.toml b/.config/alacritty/themes/kanagawa_dragon.toml new file mode 100644 index 0000000..a3dc784 --- /dev/null +++ b/.config/alacritty/themes/kanagawa_dragon.toml @@ -0,0 +1,38 @@ +# Colors (Kanagawa Dragon) +# Source https//github.com/rebelot/kanagawa.nvim + +[colors.primary] +background = '#181616' +foreground = '#c5c9c5' + +[colors.normal] +black = '#0d0c0c' +blue = '#8ba4b0' +cyan = '#8ea4a2' +green = '#8a9a7b' +magenta = '#a292a3' +red = '#c4746e' +white = '#C8C093' +yellow = '#c4b28a' + +[colors.bright] +black = '#a6a69c' +blue = '#7FB4CA' +cyan = '#7AA89F' +green = '#87a987' +magenta = '#938AA9' +red = '#E46876' +white = '#c5c9c5' +yellow = '#E6C384' + +[colors.selection] +background = '#2d4f67' +foreground = '#c8c093' + +[[colors.indexed_colors]] +index = 16 +color = '#ffa066' + +[[colors.indexed_colors]] +index = 17 +color = '#ff5d62' diff --git a/.config/alacritty/themes/kanagawa_wave.toml b/.config/alacritty/themes/kanagawa_wave.toml new file mode 100644 index 0000000..73ae8fb --- /dev/null +++ b/.config/alacritty/themes/kanagawa_wave.toml @@ -0,0 +1,38 @@ +# Colors (Kanagawa Wave) +# Source https//github.com/rebelot/kanagawa.nvim + +[colors.primary] +background = '#1f1f28' +foreground = '#dcd7ba' + +[colors.normal] +black = '#090618' +red = '#c34043' +green = '#76946a' +yellow = '#c0a36e' +blue = '#7e9cd8' +magenta = '#957fb8' +cyan = '#6a9589' +white = '#c8c093' + +[colors.bright] +black = '#727169' +red = '#e82424' +green = '#98bb6c' +yellow = '#e6c384' +blue = '#7fb4ca' +magenta = '#938aa9' +cyan = '#7aa89f' +white = '#dcd7ba' + +[colors.selection] +background = '#2d4f67' +foreground = '#c8c093' + +[[colors.indexed_colors]] +index = 16 +color = '#ffa066' + +[[colors.indexed_colors]] +index = 17 +color = '#ff5d62' diff --git a/.config/nvim/lua/tovi/core/autocmd.lua b/.config/nvim/lua/tovi/core/autocmd.lua index 2d6aabd..7613a79 100644 --- a/.config/nvim/lua/tovi/core/autocmd.lua +++ b/.config/nvim/lua/tovi/core/autocmd.lua @@ -54,20 +54,6 @@ local aucmd_dict = { vim.opt_local.syntax = 'dockerfile' end }, - - { - pattern = { '*.blade.php' }, - command = [[set syntax=html]], - }, - }, - - VimLeave = { - { - -- Save session on exit - callback = function() - require('retrospect').SaveSession() - end, - }, }, } diff --git a/.config/nvim/lua/tovi/core/options.lua b/.config/nvim/lua/tovi/core/options.lua index ee100ec..cd1cc7b 100644 --- a/.config/nvim/lua/tovi/core/options.lua +++ b/.config/nvim/lua/tovi/core/options.lua @@ -37,11 +37,7 @@ vim.opt.colorcolumn = "80" vim.opt.formatoptions = 'tqj' -vim.cmd[[let g:pdv_cfg_autoEndFunction = 0]] - vim.opt.splitbelow = true vim.opt.splitright = true vim.opt.termguicolors = true - -vim.opt.cursorline = true diff --git a/.config/nvim/lua/tovi/core/remaps.lua b/.config/nvim/lua/tovi/core/remaps.lua index 023188c..f3625c3 100644 --- a/.config/nvim/lua/tovi/core/remaps.lua +++ b/.config/nvim/lua/tovi/core/remaps.lua @@ -9,11 +9,8 @@ vim.keymap.set("v", "K", ":m '<-2gv=gv") vim.keymap.set("n", "hs", "split", { desc = "Open horizontal spilt" }) vim.keymap.set("n", "vs", "vsplit", { desc = "Open vertical spilt" }) --- Copy the entire file -vim.keymap.set("n", "y", "ggyG", { desc = "Copy the entire file to default register" }) - -- Spell-check -vim.keymap.set("n", "o", "setlocal spell! spelllang=en_au", { desc = "Toggle spell check" }) +vim.keymap.set("n", "o", vim.cmd("setlocal spell! spelllang=en_au"), { desc = "Toggle spell check" }) -- Map Q to nop vim.keymap.set("n", "Q", "", { desc = "Remap Q to because Q is the worst" }) @@ -22,17 +19,6 @@ vim.keymap.set("n", "Q", "", { desc = "Remap Q to because Q is the wo vim.keymap.set("v", "<", "", ">gv", { desc = "Keep highlight when indenting" }) --- Easily navigate tabs --- vim.keymap.set("n", "", "1gt", { desc = "Navigate to tab 2" }) --- vim.keymap.set("n", "", "2gt", { desc = "Navigate to tab 3" }) --- vim.keymap.set("n", "", "3gt", { desc = "Navigate to tab 4" }) --- vim.keymap.set("n", "", "4gt", { desc = "Navigate to tab 5" }) --- vim.keymap.set("n", "", "5gt", { desc = "Navigate to tab 6" }) --- vim.keymap.set("n", "", "6gt", { desc = "Navigate to tab 7" }) --- vim.keymap.set("n", "", "7gt", { desc = "Navigate to tab 8" }) --- vim.keymap.set("n", "", "8gt", { desc = "Navigate to tab 9" }) --- vim.keymap.set("n", "", "9gt", { desc = "Navigate to tab 10" }) - vim.keymap.set("n", "tN", "tabnew", { desc = "New tab" }) vim.keymap.set("n", "tn", "tabnext", { desc = "Next tab" }) vim.keymap.set("n", "tp", "tabprevious", { desc = "Previous tab" }) @@ -57,8 +43,8 @@ vim.keymap.set("n", "j", "cnextzz", { desc = "Next item in quic vim.keymap.set( "n", "rr", - [[:%s/\<\>//gI]], + [[:%s/\<\>//gI]], { desc = "Search and replace for word under cursor" } ) -vim.keymap.set('t', '', "",{silent = true}) +vim.keymap.set('t', '', "", { silent = true }) diff --git a/.config/nvim/lua/tovi/lazy.lua b/.config/nvim/lua/tovi/lazy.lua index b655089..9280b3a 100644 --- a/.config/nvim/lua/tovi/lazy.lua +++ b/.config/nvim/lua/tovi/lazy.lua @@ -11,18 +11,17 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -require("lazy").setup({ - { import = "tovi.plugins" }, - { import = "tovi.plugins.lsp" }, -}, { - install = { - colorscheme = { "nightfly" }, - }, - checker = { - enabled = true, - notify = false, - }, - change_detection = { - notify = false, - }, +require("lazy").setup( + { + { import = "tovi.plugins" }, + { import = "tovi.plugins.lsp" }, + }, + { + checker = { + enabled = true, + notify = false, + }, + change_detection = { + notify = false, + }, }) diff --git a/.config/nvim/lua/tovi/plugins/colorscheme.lua b/.config/nvim/lua/tovi/plugins/colorscheme.lua index 9d44f1a..6e4e562 100644 --- a/.config/nvim/lua/tovi/plugins/colorscheme.lua +++ b/.config/nvim/lua/tovi/plugins/colorscheme.lua @@ -1,65 +1,102 @@ --- return { --- "catppuccin/nvim", --- name = "catppuccin", --- priority = 1000, --- config = function () --- require("catppuccin").setup({ --- flavour = "mocha", -- latte, frappe, macchiato, mocha --- background = { -- :h background --- light = "latte", --- dark = "mocha", --- }, --- transparent_background = false, -- disables setting the background color. --- show_end_of_buffer = false, -- shows the '~' characters after the end of buffers --- term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) --- dim_inactive = { --- enabled = false, -- dims the background color of inactive window --- shade = "dark", --- percentage = 0.15, -- percentage of the shade to apply to the inactive window --- }, --- no_italic = false, -- Force no italic --- no_bold = false, -- Force no bold --- no_underline = false, -- Force no underline --- styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): --- comments = { "italic" }, -- Change the style of comments --- conditionals = { "italic" }, --- loops = {}, --- functions = {}, --- keywords = {}, --- strings = {}, --- variables = {}, --- numbers = {}, --- booleans = {}, --- properties = {}, --- types = {}, --- operators = {}, --- -- miscs = {}, -- Uncomment to turn off hard-coded styles --- }, --- color_overrides = {}, --- custom_highlights = {}, --- default_integrations = true, --- integrations = { --- cmp = true, --- gitsigns = true, --- nvimtree = true, --- treesitter = true, --- notify = false, --- mini = { --- enabled = true, --- indentscope_color = "", --- }, --- }, --- }) --- --- vim.cmd("colorscheme catppuccin") --- end --- } - return { - "ellisonleao/gruvbox.nvim", - priority = 1000 , - config = function () - require("gruvbox").setup() - vim.cmd("colorscheme gruvbox") - end, + { + "catppuccin/nvim", + enabled = false, + name = "catppuccin", + priority = 1000, + config = function () + require("catppuccin").setup({ + flavour = "mocha", -- latte, frappe, macchiato, mocha + background = { -- :h background + light = "latte", + dark = "mocha", + }, + transparent_background = false, -- disables setting the background color. + show_end_of_buffer = false, -- shows the '~' characters after the end of buffers + term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) + dim_inactive = { + enabled = false, -- dims the background color of inactive window + shade = "dark", + percentage = 0.15, -- percentage of the shade to apply to the inactive window + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + no_underline = false, -- Force no underline + styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): + comments = { "italic" }, -- Change the style of comments + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + -- miscs = {}, -- Uncomment to turn off hard-coded styles + }, + color_overrides = {}, + custom_highlights = {}, + default_integrations = true, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + treesitter = true, + notify = false, + mini = { + enabled = true, + indentscope_color = "", + }, + }, + }) + + -- vim.cmd("colorscheme catppuccin") + end + }, + { + "ellisonleao/gruvbox.nvim", + enabled = false, + priority = 1000 , + config = function () + require("gruvbox").setup() + vim.cmd("colorscheme gruvbox") + end, + }, + { + "rebelot/kanagawa.nvim", + priority = 1000 , + config = function () + -- Default options: + require('kanagawa').setup({ + compile = false, -- enable compiling the colorscheme + undercurl = true, -- enable undercurls + commentStyle = { italic = true }, + functionStyle = {}, + keywordStyle = { italic = true}, + statementStyle = { bold = true }, + typeStyle = {}, + transparent = false, -- do not set background color + dimInactive = false, -- dim inactive window `:h hl-NormalNC` + terminalColors = true, -- define vim.g.terminal_color_{0,17} + colors = { -- add/modify theme and palette colors + palette = {}, + theme = { wave = {}, lotus = {}, dragon = {}, all = {} }, + }, + overrides = function(colors) -- add/modify highlights + return {} + end, + theme = "wave", -- Load "wave" theme when 'background' option is not set + background = { -- map the value of 'background' option to a theme + dark = "wave", -- try "dragon" ! + light = "lotus" + }, + }) + + -- setup must be called before loading + vim.cmd("colorscheme kanagawa") + end + }, } diff --git a/.config/nvim/lua/tovi/plugins/linting.lua b/.config/nvim/lua/tovi/plugins/linting.lua index 2b5e8fc..10bcc4c 100644 --- a/.config/nvim/lua/tovi/plugins/linting.lua +++ b/.config/nvim/lua/tovi/plugins/linting.lua @@ -64,6 +64,7 @@ return { golang = { "gospell", "golangci-lint" }, python = { "pylint" }, dockerfile = { "hadolint" }, + blade = { "phpcs" }, } local lint_augroup = vim.api.nvim_create_augroup("lint", { diff --git a/.config/nvim/lua/tovi/plugins/lualine.lua b/.config/nvim/lua/tovi/plugins/lualine.lua index 6e990a9..b15d9d4 100644 --- a/.config/nvim/lua/tovi/plugins/lualine.lua +++ b/.config/nvim/lua/tovi/plugins/lualine.lua @@ -7,7 +7,7 @@ return { lualine.setup({ options = { - theme = 'gruvbox', + theme = 'kanagawa', component_separators = { left = '', right = '' }, section_separators = { left = '', right = '' }, }, diff --git a/.config/nvim/lua/tovi/plugins/nvim-treesitter.lua b/.config/nvim/lua/tovi/plugins/nvim-treesitter.lua index 7eb4f94..ac40c75 100644 --- a/.config/nvim/lua/tovi/plugins/nvim-treesitter.lua +++ b/.config/nvim/lua/tovi/plugins/nvim-treesitter.lua @@ -5,7 +5,6 @@ return { build = ":TSUpdate", dependencies = { "windwp/nvim-ts-autotag", - "nvim-treesitter/nvim-treesitter-textobjects", }, config = function() -- import nvim-treesitter plugin @@ -41,6 +40,7 @@ return { "dockerfile", "gitignore", "php", + "blade", }, -- enable nvim-ts-context-commentstring plugin for commenting tsx and jsx context_commentstring = { @@ -49,97 +49,24 @@ return { }, -- auto install above language parsers auto_install = true, - - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", - - ["af"] = "@function.outer", - ["if"] = "@function.inner", - - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - - ["ab"] = "@block.outer", - ["ib"] = "@block.inner", - - ["al"] = "@loop.outer", - ["il"] = "@loop.inner", - - ["am"] = "@call.outer", - ["im"] = "@call.inner", - - ["ai"] = "@conditional.outer", - ["ii"] = "@conditional.inner", - }, - selection_modes = { - ['@parameter.outer'] = 'v', -- charwise - ['@function.outer'] = 'V', -- linewise - ['@class.outer'] = '', -- blockwise - }, - include_surrounding_whitespace = true, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", - }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", - }, - goto_next = { - ["]i"] = "@conditional.outer", - ["]l"] = "@loop.outer", - }, - goto_previous = { - ["[i"] = "@conditional.outer", - ["[l"] = "@loop.outer", - } - }, - swap = { - enable = true, - swap_next = { - ["s"] = "@parameter.inner", - }, - swap_previous = { - ["S"] = "@parameter.inner", - }, - }, - }, }) - local ts_repeat_move = require("nvim-treesitter.textobjects.repeatable_move") + local parser_config = require "nvim-treesitter.parsers".get_parser_configs() - local keymap = vim.keymap - - -- vim way: ; goes to the direction you were moving. - keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move) - keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite) + parser_config.blade = { + install_info = { + url = "https://github.com/EmranMR/tree-sitter-blade", + files = { "src/parser.c" }, + branch = "main", + }, + filetype = "blade" + } - -- Optionally, make builtin f, F, t, T also repeatable with ; and , - keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f) - keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F) - keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t) - keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T) + vim.filetype.add({ + pattern = { + ['.*%.blade%.php'] = 'blade', + } + }) end, }, } diff --git a/.config/nvim/lua/tovi/plugins/retrospect.lua b/.config/nvim/lua/tovi/plugins/retrospect.lua deleted file mode 100644 index 1fb6be3..0000000 --- a/.config/nvim/lua/tovi/plugins/retrospect.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "mrquantumcodes/retrospect.nvim", - config = function () - local retrospect = require('retrospect') - retrospect.setup({ - saveKey = "\\", - loadKey = "", - style = "default", - }) - end -} diff --git a/.config/nvim/lua/tovi/plugins/tmux.lua b/.config/nvim/lua/tovi/plugins/tmux.lua index 0844590..2bc4e13 100644 --- a/.config/nvim/lua/tovi/plugins/tmux.lua +++ b/.config/nvim/lua/tovi/plugins/tmux.lua @@ -5,6 +5,11 @@ return { copy_sync = { enable = false }, + navigation = { + cycle_navigation = true, + enable_default_keybindings = true, + persist_zoom = true, + }, resize = { -- enables default keybindings (A-hjkl) for normal mode enable_default_keybindings = false, diff --git a/.config/nvim/lua/tovi/plugins/vim-blade.lua b/.config/nvim/lua/tovi/plugins/vim-blade.lua new file mode 100644 index 0000000..f1c92a4 --- /dev/null +++ b/.config/nvim/lua/tovi/plugins/vim-blade.lua @@ -0,0 +1,3 @@ +return { + 'jwalton512/vim-blade' +} diff --git a/.tmux.conf b/.tmux.conf index 050ea9a..829d1f8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -65,8 +65,14 @@ 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 'egel/tmux-gruvbox' -set -g @tmux-gruvbox 'dark' # or 'light' +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' # diff --git a/.zshrc b/.zshrc index aca0bf5..05f16bf 100644 --- a/.zshrc +++ b/.zshrc @@ -100,7 +100,7 @@ if [[ $(uname) == 'Darwin' ]]; then eval "$(rbenv init - zsh)" fi -export PATH="${HOME}/.local/bin/:${HOME}/go/bin:${PATH}" +export PATH="${HOME}/.local/bin/:${HOME}/go/bin:${HOME}/.cargo/bin:${PATH}" source <(fzf --zsh)