Browse Source

Merge branch 'master' of git.tovijaeschke.xyz:tovi/dotfiles

master
Tovi Jaeschke-Rogers 6 months ago
parent
commit
3e06182234
16 changed files with 227 additions and 216 deletions
  1. +1
    -1
      .config/alacritty/alacritty.toml
  2. +38
    -0
      .config/alacritty/themes/kanagawa_dragon.toml
  3. +38
    -0
      .config/alacritty/themes/kanagawa_wave.toml
  4. +0
    -14
      .config/nvim/lua/tovi/core/autocmd.lua
  5. +0
    -4
      .config/nvim/lua/tovi/core/options.lua
  6. +3
    -17
      .config/nvim/lua/tovi/core/remaps.lua
  7. +13
    -14
      .config/nvim/lua/tovi/lazy.lua
  8. +100
    -63
      .config/nvim/lua/tovi/plugins/colorscheme.lua
  9. +1
    -0
      .config/nvim/lua/tovi/plugins/linting.lua
  10. +1
    -1
      .config/nvim/lua/tovi/plugins/lualine.lua
  11. +15
    -88
      .config/nvim/lua/tovi/plugins/nvim-treesitter.lua
  12. +0
    -11
      .config/nvim/lua/tovi/plugins/retrospect.lua
  13. +5
    -0
      .config/nvim/lua/tovi/plugins/tmux.lua
  14. +3
    -0
      .config/nvim/lua/tovi/plugins/vim-blade.lua
  15. +8
    -2
      .tmux.conf
  16. +1
    -1
      .zshrc

+ 1
- 1
.config/alacritty/alacritty.toml View File

@ -1,5 +1,5 @@
import = [ import = [
"~/.config/alacritty/themes/gruvbox_dark.toml"
"~/.config/alacritty/themes/kanagawa_wave.toml"
] ]
[env] [env]


+ 38
- 0
.config/alacritty/themes/kanagawa_dragon.toml View File

@ -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'

+ 38
- 0
.config/alacritty/themes/kanagawa_wave.toml View File

@ -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'

+ 0
- 14
.config/nvim/lua/tovi/core/autocmd.lua View File

@ -54,20 +54,6 @@ local aucmd_dict = {
vim.opt_local.syntax = 'dockerfile' vim.opt_local.syntax = 'dockerfile'
end end
}, },
{
pattern = { '*.blade.php' },
command = [[set syntax=html]],
},
},
VimLeave = {
{
-- Save session on exit
callback = function()
require('retrospect').SaveSession()
end,
},
}, },
} }


+ 0
- 4
.config/nvim/lua/tovi/core/options.lua View File

@ -37,11 +37,7 @@ vim.opt.colorcolumn = "80"
vim.opt.formatoptions = 'tqj' vim.opt.formatoptions = 'tqj'
vim.cmd[[let g:pdv_cfg_autoEndFunction = 0]]
vim.opt.splitbelow = true vim.opt.splitbelow = true
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.cursorline = true

+ 3
- 17
.config/nvim/lua/tovi/core/remaps.lua View File

@ -9,11 +9,8 @@ vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "<leader>hs", "<cmd>split<cr>", { desc = "Open horizontal spilt" }) vim.keymap.set("n", "<leader>hs", "<cmd>split<cr>", { desc = "Open horizontal spilt" })
vim.keymap.set("n", "<leader>vs", "<cmd>vsplit<cr>", { desc = "Open vertical spilt" }) vim.keymap.set("n", "<leader>vs", "<cmd>vsplit<cr>", { desc = "Open vertical spilt" })
-- Copy the entire file
vim.keymap.set("n", "<leader>y", "ggyG<C-o>", { desc = "Copy the entire file to default register" })
-- Spell-check -- Spell-check
vim.keymap.set("n", "<leader>o", "<cmd>setlocal spell! spelllang=en_au<CR>", { desc = "Toggle spell check" })
vim.keymap.set("n", "<leader>o", vim.cmd("setlocal spell! spelllang=en_au"), { desc = "Toggle spell check" })
-- Map Q to nop -- Map Q to nop
vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the worst" }) vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the worst" })
@ -22,17 +19,6 @@ vim.keymap.set("n", "Q", "<nop>", { desc = "Remap Q to <nop> because Q is the wo
vim.keymap.set("v", "<", "<gv", { desc = "Keep highlight when indenting" }) vim.keymap.set("v", "<", "<gv", { desc = "Keep highlight when indenting" })
vim.keymap.set("v", ">", ">gv", { desc = "Keep highlight when indenting" }) vim.keymap.set("v", ">", ">gv", { desc = "Keep highlight when indenting" })
-- Easily navigate tabs
-- vim.keymap.set("n", "<A-1>", "1gt", { desc = "Navigate to tab 2" })
-- vim.keymap.set("n", "<A-2>", "2gt", { desc = "Navigate to tab 3" })
-- vim.keymap.set("n", "<A-3>", "3gt", { desc = "Navigate to tab 4" })
-- vim.keymap.set("n", "<A-4>", "4gt", { desc = "Navigate to tab 5" })
-- vim.keymap.set("n", "<A-5>", "5gt", { desc = "Navigate to tab 6" })
-- vim.keymap.set("n", "<A-6>", "6gt", { desc = "Navigate to tab 7" })
-- vim.keymap.set("n", "<A-7>", "7gt", { desc = "Navigate to tab 8" })
-- vim.keymap.set("n", "<A-8>", "8gt", { desc = "Navigate to tab 9" })
-- vim.keymap.set("n", "<A-9>", "9gt", { desc = "Navigate to tab 10" })
vim.keymap.set("n", "<leader>tN", "<cmd>tabnew<CR>", { desc = "New tab" }) vim.keymap.set("n", "<leader>tN", "<cmd>tabnew<CR>", { desc = "New tab" })
vim.keymap.set("n", "<leader>tn", "<cmd>tabnext<CR>", { desc = "Next tab" }) vim.keymap.set("n", "<leader>tn", "<cmd>tabnext<CR>", { desc = "Next tab" })
vim.keymap.set("n", "<leader>tp", "<cmd>tabprevious<CR>", { desc = "Previous tab" }) vim.keymap.set("n", "<leader>tp", "<cmd>tabprevious<CR>", { desc = "Previous tab" })
@ -57,8 +43,8 @@ vim.keymap.set("n", "<leader>j", "<cmd>cnext<CR>zz", { desc = "Next item in quic
vim.keymap.set( vim.keymap.set(
"n", "n",
"<leader>rr", "<leader>rr",
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
[[:%s/\<<C-r><C-w>\>//gI<Left><Left><Left>]],
{ desc = "Search and replace for word under cursor" } { desc = "Search and replace for word under cursor" }
) )
vim.keymap.set('t', '<C-space>', "<C-\\><C-n>",{silent = true})
vim.keymap.set('t', '<C-space>', "<C-\\><C-n>", { silent = true })

+ 13
- 14
.config/nvim/lua/tovi/lazy.lua View File

@ -11,18 +11,17 @@ if not vim.loop.fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) 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,
},
}) })

+ 100
- 63
.config/nvim/lua/tovi/plugins/colorscheme.lua View File

@ -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 { 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
},
} }

+ 1
- 0
.config/nvim/lua/tovi/plugins/linting.lua View File

@ -64,6 +64,7 @@ return {
golang = { "gospell", "golangci-lint" }, golang = { "gospell", "golangci-lint" },
python = { "pylint" }, python = { "pylint" },
dockerfile = { "hadolint" }, dockerfile = { "hadolint" },
blade = { "phpcs" },
} }
local lint_augroup = vim.api.nvim_create_augroup("lint", { local lint_augroup = vim.api.nvim_create_augroup("lint", {


+ 1
- 1
.config/nvim/lua/tovi/plugins/lualine.lua View File

@ -7,7 +7,7 @@ return {
lualine.setup({ lualine.setup({
options = { options = {
theme = 'gruvbox',
theme = 'kanagawa',
component_separators = { left = '', right = '' }, component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }, section_separators = { left = '', right = '' },
}, },


+ 15
- 88
.config/nvim/lua/tovi/plugins/nvim-treesitter.lua View File

@ -5,7 +5,6 @@ return {
build = ":TSUpdate", build = ":TSUpdate",
dependencies = { dependencies = {
"windwp/nvim-ts-autotag", "windwp/nvim-ts-autotag",
"nvim-treesitter/nvim-treesitter-textobjects",
}, },
config = function() config = function()
-- import nvim-treesitter plugin -- import nvim-treesitter plugin
@ -41,6 +40,7 @@ return {
"dockerfile", "dockerfile",
"gitignore", "gitignore",
"php", "php",
"blade",
}, },
-- enable nvim-ts-context-commentstring plugin for commenting tsx and jsx -- enable nvim-ts-context-commentstring plugin for commenting tsx and jsx
context_commentstring = { context_commentstring = {
@ -49,97 +49,24 @@ return {
}, },
-- auto install above language parsers -- auto install above language parsers
auto_install = true, 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'] = '<c-v>', -- 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 = {
["<leader>s"] = "@parameter.inner",
},
swap_previous = {
["<leader>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, end,
}, },
} }

+ 0
- 11
.config/nvim/lua/tovi/plugins/retrospect.lua View File

@ -1,11 +0,0 @@
return {
"mrquantumcodes/retrospect.nvim",
config = function ()
local retrospect = require('retrospect')
retrospect.setup({
saveKey = "<leader>\\",
loadKey = "<leader><BS>",
style = "default",
})
end
}

+ 5
- 0
.config/nvim/lua/tovi/plugins/tmux.lua View File

@ -5,6 +5,11 @@ return {
copy_sync = { copy_sync = {
enable = false enable = false
}, },
navigation = {
cycle_navigation = true,
enable_default_keybindings = true,
persist_zoom = true,
},
resize = { resize = {
-- enables default keybindings (A-hjkl) for normal mode -- enables default keybindings (A-hjkl) for normal mode
enable_default_keybindings = false, enable_default_keybindings = false,


+ 3
- 0
.config/nvim/lua/tovi/plugins/vim-blade.lua View File

@ -0,0 +1,3 @@
return {
'jwalton512/vim-blade'
}

+ 8
- 2
.tmux.conf View File

@ -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/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' 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' # set -g @plugin 'catppuccin/tmux'
# #


+ 1
- 1
.zshrc View File

@ -100,7 +100,7 @@ if [[ $(uname) == 'Darwin' ]]; then
eval "$(rbenv init - zsh)" eval "$(rbenv init - zsh)"
fi 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) source <(fzf --zsh)


Loading…
Cancel
Save