Update config

This commit is contained in:
Jan Eitzinger 2024-02-16 15:27:16 +01:00
parent e79872f201
commit 3e1f864675
8 changed files with 16 additions and 213 deletions

View File

@ -14,4 +14,6 @@ LICENSE
.config/nvim/stylua.toml .config/nvim/stylua.toml
.config/nvim/lua/config .config/nvim/lua/config
.config/nvim/lua/plugins/core.lua .config/nvim/lua/plugins/core.lua
.config/nvim/lua/plugins/test.lua
.config/nvim/lua/plugins/disabled.lua
{{ end }} {{ end }}

View File

@ -1,16 +1,10 @@
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
font_family BrutalistMono Nerd Font Regular font_family BrutalistMono Nerd Font Regular
bold_font BrutalistMono Nerd Font Regular bold_font BrutalistMono Nerd Font Regular
# italic_font auto # italic_font auto
# bold_italic_font auto # bold_italic_font auto
font_size 16.0 font_size {{ .fontsize }}
text_composition_strategy 1.0 text_composition_strategy 1.0
#: }}}
#: Cursor customization {{{
# cursor #32cd32 # cursor #32cd32
#: Default cursor color #: Default cursor color
# cursor_text_color #000000 # cursor_text_color #000000
@ -26,10 +20,6 @@ text_composition_strategy 1.0
# cursor_blink_interval 0.5 # cursor_blink_interval 0.5
# cursor_stop_blinking_after 15.0 # cursor_stop_blinking_after 15.0
#: }}}
#: Scrollback {{{
# scrollback_lines 2000 # scrollback_lines 2000
#: Number of lines of history to keep in memory for scrolling back. #: Number of lines of history to keep in memory for scrolling back.
@ -54,10 +44,6 @@ text_composition_strategy 1.0
#: scrolling on platforms such as macOS and Wayland. Use negative #: scrolling on platforms such as macOS and Wayland. Use negative
#: numbers to change scroll direction. #: numbers to change scroll direction.
#: }}}
#: Mouse {{{
# url_color #0087BD # url_color #0087BD
# url_style curly # url_style curly
@ -110,9 +96,6 @@ text_composition_strategy 1.0
#: Set the active window to the window under the mouse when moving the #: Set the active window to the window under the mouse when moving the
#: mouse around #: mouse around
#: }}}
#: Performance tuning {{{
# repaint_delay 10 # repaint_delay 10
@ -140,10 +123,6 @@ sync_to_monitor yes
#: keyboard repeat rate, you may notice some slight input latency. If #: keyboard repeat rate, you may notice some slight input latency. If
#: so, set this to no. #: so, set this to no.
#: }}}
#: Window layout {{{
# remember_window_size yes # remember_window_size yes
# initial_window_width 640 # initial_window_width 640
# initial_window_height 400 # initial_window_height 400
@ -216,20 +195,12 @@ enabled_layouts Horizontal,Stack
#: Fade the text in inactive windows by the specified amount (a number #: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded). #: between zero and one, with zero being fully faded).
#: }}}
#: Tab bar {{{
tab_bar_edge top tab_bar_edge top
tab_bar_style separator tab_bar_style separator
tab_separator " ┇" tab_separator " ┇"
#: }}}
#: Advanced {{{
# shell . # shell .
#: The shell program to execute. The default value of . means to use #: The shell program to execute. The default value of . means to use
@ -307,9 +278,6 @@ tab_separator " ┇"
#: from key-presses, to colors, to various advanced features may not #: from key-presses, to colors, to various advanced features may not
#: work. #: work.
#: }}}
#: OS specific tweaks {{{
macos_option_as_alt yes macos_option_as_alt yes
@ -351,9 +319,6 @@ macos_custom_beam_cursor yes
#: on both light and dark backgrounds. WARNING: this might make your #: on both light and dark backgrounds. WARNING: this might make your
#: mouse cursor invisible on dual GPU machines. #: mouse cursor invisible on dual GPU machines.
#: }}}
#: Keyboard shortcuts {{{
#: For a list of key names, see: GLFW keys #: For a list of key names, see: GLFW keys
#: <http://www.glfw.org/docs/latest/group__keys.html>. The name to use #: <http://www.glfw.org/docs/latest/group__keys.html>. The name to use
@ -418,8 +383,6 @@ macos_custom_beam_cursor yes
#: You can have kitty remove all shortcut definition seen up to this #: You can have kitty remove all shortcut definition seen up to this
#: point. Useful, for instance, to remove the default shortcuts. #: point. Useful, for instance, to remove the default shortcuts.
#: Clipboard {{{
# map cmd+c copy_to_clipboard # map cmd+c copy_to_clipboard
# map kitty_mod+c copy_to_clipboard # map kitty_mod+c copy_to_clipboard
# map cmd+v paste_from_clipboard # map cmd+v paste_from_clipboard
@ -439,9 +402,6 @@ macos_custom_beam_cursor yes
#: map kitty_mod+y new_window less @selection #: map kitty_mod+y new_window less @selection
#: }}}
#: Scrolling {{{
# map kitty_mod+up scroll_line_up # map kitty_mod+up scroll_line_up
# map kitty_mod+k scroll_line_up # map kitty_mod+k scroll_line_up
@ -475,9 +435,6 @@ macos_custom_beam_cursor yes
#: creating any windows, useful if the program is a GUI program that #: creating any windows, useful if the program is a GUI program that
#: creates its own windows. #: creates its own windows.
#: }}}
#: Window management {{{
# map kitty_mod+enter new_window # map kitty_mod+enter new_window
@ -517,9 +474,6 @@ macos_custom_beam_cursor yes
# map kitty_mod+8 eighth_window # map kitty_mod+8 eighth_window
# map kitty_mod+9 ninth_window # map kitty_mod+9 ninth_window
# map kitty_mod+0 tenth_window # map kitty_mod+0 tenth_window
#: }}}
#: Tab management {{{
# map alt+left previous_tab # map alt+left previous_tab
# map alt+right next_tab # map alt+right next_tab
# map alt+1 goto_tab 1 # map alt+1 goto_tab 1
@ -555,9 +509,6 @@ macos_custom_beam_cursor yes
#: the current tab rather than at the end of the tabs list, use:: #: the current tab rather than at the end of the tabs list, use::
#: map ctrl+t new_tab !neighbor [optional cmd to run] #: map ctrl+t new_tab !neighbor [optional cmd to run]
#: }}}
#: Layout management {{{
# map kitty_mod+l next_layout # map kitty_mod+l next_layout
@ -569,9 +520,6 @@ macos_custom_beam_cursor yes
#: Similarly, to switch back to the previous layout:: #: Similarly, to switch back to the previous layout::
#: map ctrl+alt+p last_used_layout #: map ctrl+alt+p last_used_layout
#: }}}
#: Font sizes {{{
#: You can change the font size for all top-level kitty windows at a #: You can change the font size for all top-level kitty windows at a
#: time or only the current one. #: time or only the current one.
@ -587,9 +535,6 @@ macos_custom_beam_cursor yes
#: To setup shortcuts to change only the current window's font size:: #: To setup shortcuts to change only the current window's font size::
#: map kitty_mod+f6 change_font_size current 10.0 #: map kitty_mod+f6 change_font_size current 10.0
#: }}}
#: Select and act on visible text {{{
#: Use the hints kitten to select text and either pass it to an #: Use the hints kitten to select text and either pass it to an
#: external program or insert it into the terminal or copy it to the #: external program or insert it into the terminal or copy it to the
@ -628,9 +573,6 @@ macos_custom_beam_cursor yes
#: The hints kitten has many more modes of operation that you can map #: The hints kitten has many more modes of operation that you can map
#: to different shortcuts. For a full description see kittens/hints. #: to different shortcuts. For a full description see kittens/hints.
#: }}}
#: Miscellaneous {{{
# map kitty_mod+f11 toggle_fullscreen # map kitty_mod+f11 toggle_fullscreen
# map kitty_mod+u kitten unicode_input # map kitty_mod+u kitten unicode_input
@ -680,10 +622,6 @@ macos_custom_beam_cursor yes
#: map ctrl+alt+a send_text normal Word\x1b[H #: map ctrl+alt+a send_text normal Word\x1b[H
#: map ctrl+alt+a send_text application Word\x1bOH #: map ctrl+alt+a send_text application Word\x1bOH
#: }}}
# }}}
# BEGIN_KITTY_THEME # BEGIN_KITTY_THEME
# Catppuccin-Mocha # Catppuccin-Mocha

View File

@ -1,4 +1,5 @@
return { return {
{{- if eq .chezmoi.os "openbsd" }}
-- snippets -- snippets
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
@ -102,113 +103,7 @@ return {
require("cmp").setup(opts) require("cmp").setup(opts)
end, end,
}, },
{{ else }}
-- auto pairs
{
"echasnovski/mini.pairs",
event = "VeryLazy",
opts = {},
keys = {
{
"<leader>up",
function()
local Util = require("lazy.core.util")
vim.g.minipairs_disable = not vim.g.minipairs_disable
if vim.g.minipairs_disable then
Util.warn("Disabled auto pairs", { title = "Option" })
else
Util.info("Enabled auto pairs", { title = "Option" })
end
end,
desc = "Toggle auto pairs",
},
},
},
-- Fast and feature-rich surround actions. For text that includes
-- surrounding characters like brackets or quotes, this allows you
-- to select the text inside, change or modify the surrounding characters,
-- and more.
{
"echasnovski/mini.surround",
keys = function(_, keys)
-- Populate the keys based on the user's options
local plugin = require("lazy.core.config").spec.plugins["mini.surround"]
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
local mappings = {
{ opts.mappings.add, desc = "Add surrounding", mode = { "n", "v" } },
{ opts.mappings.delete, desc = "Delete surrounding" },
{ opts.mappings.find, desc = "Find right surrounding" },
{ opts.mappings.find_left, desc = "Find left surrounding" },
{ opts.mappings.highlight, desc = "Highlight surrounding" },
{ opts.mappings.replace, desc = "Replace surrounding" },
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
}
mappings = vim.tbl_filter(function(m)
return m[1] and #m[1] > 0
end, mappings)
return vim.list_extend(mappings, keys)
end,
opts = {
mappings = {
add = "gsa", -- Add surrounding in Normal and Visual modes
delete = "gsd", -- Delete surrounding
find = "gsf", -- Find surrounding (to the right)
find_left = "gsF", -- Find surrounding (to the left)
highlight = "gsh", -- Highlight surrounding
replace = "gsr", -- Replace surrounding
update_n_lines = "gsn", -- Update `n_lines`
},
},
},
-- comments
{
"JoosepAlviste/nvim-ts-context-commentstring",
lazy = true,
opts = {
enable_autocmd = false,
},
},
{
"echasnovski/mini.comment",
event = "VeryLazy",
opts = {
options = {
custom_commentstring = function()
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo
.commentstring
end,
},
},
},
-- Better text-objects
{
"echasnovski/mini.ai",
-- keys = {
-- { "a", mode = { "x", "o" } },
-- { "i", mode = { "x", "o" } },
-- },
opts = function()
local ai = require("mini.ai")
return {
n_lines = 500,
custom_textobjects = {
o = ai.gen_spec.treesitter({
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
}, {}),
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}),
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}),
t = { "<([%p%w]-)%f[^<%w][^<>]->.-</%1>", "^<.->().*()</[^/]->$" },
},
}
end,
config = function(_, opts)
require("mini.ai").setup(opts)
end,
},
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
opts = function(_, opts) opts = function(_, opts)
@ -216,6 +111,7 @@ return {
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "neorg" } })) opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "neorg" } }))
end, end,
}, },
{{ end }}
{ {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
event = "InsertEnter", event = "InsertEnter",

View File

@ -1,4 +1,5 @@
return { return {
{{- if eq .chezmoi.os "openbsd" }}
-- Better `vim.notify()` -- Better `vim.notify()`
{ {
"rcarriga/nvim-notify", "rcarriga/nvim-notify",
@ -56,33 +57,6 @@ return {
}, },
}, },
-- indent guides for Neovim
-- {
-- "lukas-reineke/indent-blankline.nvim",
-- opts = {
-- indent = {
-- char = "│",
-- tab_char = "│",
-- },
-- scope = { enabled = false },
-- exclude = {
-- filetypes = {
-- "help",
-- "alpha",
-- "dashboard",
-- "neo-tree",
-- "Trouble",
-- "lazy",
-- "mason",
-- "notify",
-- "toggleterm",
-- "lazyterm",
-- },
-- },
-- },
-- main = "ibl",
-- },
-- Active indent guide and indent text objects. When you're browsing -- Active indent guide and indent text objects. When you're browsing
-- code, this highlights the current level of indentation, and animates -- code, this highlights the current level of indentation, and animates
-- the highlighting. -- the highlighting.
@ -226,12 +200,13 @@ return {
} }
end, end,
}, },
-- icons -- icons
{ "nvim-tree/nvim-web-devicons", lazy = true }, { "nvim-tree/nvim-web-devicons", lazy = true },
-- ui components -- ui components
{ "MunifTanjim/nui.nvim", lazy = true }, { "MunifTanjim/nui.nvim", lazy = true },
{{ else }}
-- change lualine -- change lualine
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
@ -240,6 +215,7 @@ return {
opts.sections.lualine_b = { { "branch", icon = " " } } opts.sections.lualine_b = { { "branch", icon = " " } }
end, end,
}, },
{{ end }}
{ {
"RRethy/vim-illuminate", "RRethy/vim-illuminate",
config = function() config = function()

View File

@ -308,7 +308,7 @@ Copy the file to $HOME/.config/openbox/ instead. -->
<enabled>true</enabled> <enabled>true</enabled>
<name>Terminal</name> <name>Terminal</name>
</startupnotify> </startupnotify>
<command>st</command> <command>kitty</command>
</action> </action>
</keybind> </keybind>
<keybind key="W-l"> <keybind key="W-l">
@ -699,6 +699,10 @@ Copy the file to $HOME/.config/openbox/ instead. -->
<maximized>true</maximized> <maximized>true</maximized>
<decor>no</decor> <decor>no</decor>
</application> </application>
<application class="kitty">
<maximized>true</maximized>
<decor>no</decor>
</application>
<application class="Zathura"> <application class="Zathura">
<maximized>yes</maximized> <maximized>yes</maximized>
<desktop>4</desktop> <desktop>4</desktop>

View File

@ -24,15 +24,6 @@ bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5 bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6 bind -n M-6 select-window -t 6
{{- if eq .chezmoi.os "darwin" }}
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
{{- else }}
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard"
{{- end }}
# enable vi mode # enable vi mode
setw -g mode-keys vi setw -g mode-keys vi

View File

@ -10,13 +10,12 @@ DISABLE_UNTRACKED_FILES_DIRTY="true"
COMPLETION_WAITING_DOTS="false" COMPLETION_WAITING_DOTS="false"
export FZF_DEFAULT_COMMAND="fd --type file --color=always" export FZF_DEFAULT_COMMAND="fd --type file --color=always"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS="--ansi"
zle -N zle-line-init zle -N zle-line-init
zle -N zle-keymap-select zle -N zle-keymap-select
export KEYTIMEOUT=1 export KEYTIMEOUT=1
export PATH=$HOME/.cargo/bin:/usr/local/bin:/usr/local/sbin:$PATH
plugins={{ .plugins }} plugins={{ .plugins }}
#chezmoi aliases #chezmoi aliases
@ -26,7 +25,6 @@ alias cap='chezmoi apply'
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
export EDITOR='nvim' export EDITOR='nvim'

View File

@ -30,9 +30,7 @@ export HOME=/home/jan
export PATH=$HOME/local/bin:$HOME/.fzf/bin:$HOME/go/bin:$PATH export PATH=$HOME/local/bin:$HOME/.fzf/bin:$HOME/go/bin:$PATH
{{- if eq .chezmoi.os "openbsd" }} {{- if eq .chezmoi.os "openbsd" }}
# dock.sh
syncthing -no-browser -home="/home/jan/.config/syncthing" & syncthing -no-browser -home="/home/jan/.config/syncthing" &
parcellite -d -n &
unclutter -root -idle 2 -noevents & unclutter -root -idle 2 -noevents &
xidle -timeout 300 -program "/usr/local/bin/slock" & xidle -timeout 300 -program "/usr/local/bin/slock" &
{{- end }} {{- end }}