Compare commits

...

7 Commits

19 changed files with 1147 additions and 273 deletions

View File

@ -10,6 +10,10 @@ LICENSE
.config/openbox/* .config/openbox/*
.config/nvim/after .config/nvim/after
{{ else }} {{ else }}
lazyvim.json .config/nvim/lazyvim.json
stylua.toml .config/nvim/stylua.toml
.config/nvim/lua/config
.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,114 +1,24 @@
{{- if eq .chezmoi.os "openbsd" }} {{- if eq .chezmoi.os "openbsd" }}
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
HOME = os.getenv("HOME") HOME = os.getenv("HOME")
vim.cmd([[colorscheme gruvbox]])
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = '\\' vim.g.maplocalleader = '\\'
-- Plugins -- Plugins
require "paq" { require("lazy").setup("plugins")
"savq/paq-nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-treesitter/nvim-treesitter-textobjects",
-- Theming
"ellisonleao/gruvbox.nvim",
"nvim-lualine/lualine.nvim",
"nvim-tree/nvim-web-devicons",
"lukas-reineke/indent-blankline.nvim",
-- LSP support
"onsails/lspkind.nvim",
"lukas-reineke/lsp-format.nvim",
"neovim/nvim-lspconfig",
-- Autocomplete
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
-- Snippets
"L3MON4D3/LuaSnip",
"rafamadriz/friendly-snippets",
-- Programming support
"kylechui/nvim-surround",
"windwp/nvim-autopairs",
"numToStr/Comment.nvim",
"ggandor/leap.nvim",
-- Fuzzy search
{ "nvim-telescope/telescope-fzf-native.nvim", run = "gmake" },
"nvim-telescope/telescope-file-browser.nvim",
"nvim-telescope/telescope.nvim",
"folke/trouble.nvim",
"mfussenegger/nvim-dap",
"theHamsta/nvim-dap-virtual-text",
"rcarriga/nvim-dap-ui",
"norcalli/nvim-colorizer.lua",
"lewis6991/gitsigns.nvim",
"tpope/vim-fugitive",
"renerocksai/telekasten.nvim",
"renerocksai/calendar-vim",
"nvim-lua/plenary.nvim",
"akinsho/toggleterm.nvim",
}
require('nvim-web-devicons').setup {}
require('nvim-surround').setup()
require('Comment').setup()
require('dapui').setup()
require('gitsigns').setup()
require("trouble").setup {}
require('nvim-autopairs').setup({
fast_wrap = {},
check_ts = true
})
require('leap').add_default_mappings()
require 'colorizer'.setup {
filetypes = {
'css',
'javascript',
scss = { rgb_fn = true, },
html = { mode = 'foreground', }
},
}
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'gruvbox',
component_separators = '|',
section_separators = '',
}
}
require('indent_blankline').setup({
char = '▏',
show_trailing_blankline_indent = false,
show_first_indent_level = false,
use_treesitter = true,
show_current_context = false
})
require('toggleterm').setup({
open_mapping = '<C-g>',
direction = 'horizontal',
shade_terminals = true
})
require("gruvbox").setup {
contrast = "hard"
}
-- Options -- Options
local o = vim.opt local o = vim.opt
@ -290,12 +200,6 @@ map('n', '<down>', '<cmd>resize +2<CR>')
map('n', '<left>', '<cmd>vertical resize -2<CR>') map('n', '<left>', '<cmd>vertical resize -2<CR>')
map('n', '<right>', '<cmd>vertical resize +2<CR>') map('n', '<right>', '<cmd>vertical resize +2<CR>')
-- Trouble keymap
map('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { noremap = true, silent = true })
map('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', { noremap = true, silent = true })
map('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { noremap = true, silent = true })
map('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { noremap = true, silent = true })
map('n', '<leader>g', '<cmd>vertical rightbelow Git<cr>', { noremap = true, silent = true }) map('n', '<leader>g', '<cmd>vertical rightbelow Git<cr>', { noremap = true, silent = true })
{{ else }} {{ else }}
-- bootstrap lazy.nvim, LazyVim and your plugins -- bootstrap lazy.nvim, LazyVim and your plugins

View File

@ -1,16 +0,0 @@
return {
{
"hrsh7th/nvim-cmp",
opts = function(_, opts)
local cmp = require("cmp")
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "neorg" } }))
end,
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {
fast_wrap = {},
},
},
}

View File

@ -0,0 +1,122 @@
return {
{{- if eq .chezmoi.os "openbsd" }}
-- snippets
{
"L3MON4D3/LuaSnip",
build = (not jit.os:find("Windows"))
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
or nil,
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
opts = {
history = true,
delete_check_events = "TextChanged",
},
-- stylua: ignore
keys = {
{
"<tab>",
function()
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
end,
expr = true,
silent = true,
mode = "i",
},
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
},
},
-- auto completion
{
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip",
},
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local luasnip = require('luasnip')
local lspkind = require('lspkind')
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
return {
completion = {
completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp", keyword_length = 1 },
{ name = "luasnip", keyword_length = 2 },
{ name = "path" },
}, {
{ name = "buffer", keyword_length = 3 },
}),
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
})
},
experimental = {
ghost_text = {
hl_group = "CmpGhostText",
},
},
sorting = defaults.sorting,
}
end,
config = function(_, opts)
for _, source in ipairs(opts.sources) do
source.group_index = source.group_index or 1
end
require("cmp").setup(opts)
end,
},
{{ else }}
{
"hrsh7th/nvim-cmp",
opts = function(_, opts)
local cmp = require("cmp")
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "neorg" } }))
end,
},
{{ end }}
{
"windwp/nvim-autopairs",
event = "InsertEnter",
opts = {
fast_wrap = {},
},
},
}

View File

@ -1,20 +0,0 @@
return {
-- gruvbox
{
"ellisonleao/gruvbox.nvim",
opts = { contrast = "hard" },
},
-- kanagawa
{
"rebelot/kanagawa.nvim",
},
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "kanagawa",
},
},
}

View File

@ -0,0 +1,28 @@
return {
-- gruvbox
{
"ellisonleao/gruvbox.nvim",
opts = { contrast = "hard" },
},
{{- if eq .chezmoi.os "openbsd" }}
-- kanagawa
{
"rebelot/kanagawa.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
vim.cmd([[colorscheme kanagawa]])
end,
},
{{- else }}
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "kanagawa",
},
},
{{- end }}
}

View File

@ -0,0 +1,270 @@
return {
-- Fuzzy finder.
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
version = false, -- telescope did only one release, so use HEAD for now
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
"nvim-telescope/telescope-file-browser.nvim",
},
keys = {
{ "<C-n>", "<cmd>Telescope file_browser<cr>", desc = "File browser" },
{ "<leader>e", "<cmd>Telescope find_files<cr>", desc = "Find file" },
{ "<leader>b", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
{ "<leader>f", "<cmd>Telescope live_grep<cr>", desc = "Switch Buffer" },
{ "<leader>h", "<cmd>Telescope help_tags<cr>", desc = "Search help tags" },
{ "z=", "<cmd>Telescope spell_suggest<cr>", desc = "Spell options" },
},
opts = function()
local actions = require("telescope.actions")
local open_with_trouble = function(...)
return require("trouble.providers.telescope").open_with_trouble(...)
end
local open_selected_with_trouble = function(...)
return require("trouble.providers.telescope").open_selected_with_trouble(...)
end
return {
defaults = {
prompt_prefix = "",
selection_caret = "",
layout_config = { horizontal = { preview_width = 0.5 } },
file_ignore_patterns = { 'node_modules/.*' },
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
}
},
mappings = {
i = {
["<c-t>"] = open_with_trouble,
["<a-t>"] = open_selected_with_trouble,
["<C-Down>"] = actions.cycle_history_next,
["<C-Up>"] = actions.cycle_history_prev,
["<C-f>"] = actions.preview_scrolling_down,
["<C-b>"] = actions.preview_scrolling_up,
},
n = {
["q"] = actions.close,
},
},
},
}
end,
},
-- add telescope-fzf-native
{
"telescope.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
build = "gmake",
config = function()
require("telescope").load_extension("fzf")
end,
},
},
-- which-key helps you remember key bindings by showing a popup
-- with the active keybindings of the command you started typing.
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
plugins = { spelling = true },
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gs"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
},
-- git signs highlights text that has changed since the list
-- git commit, and also lets you interactively stage & unstage
-- hunks in a commit.
{
"lewis6991/gitsigns.nvim",
opts = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
on_attach = function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end
-- stylua: ignore start
map("n", "]h", gs.next_hunk, "Next Hunk")
map("n", "[h", gs.prev_hunk, "Prev Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>ghp", gs.preview_hunk, "Preview Hunk")
map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end,
},
},
-- Automatically highlights other instances of the word under your cursor.
-- This works with LSP, Treesitter, and regexp matching to find the other
-- instances.
{
"RRethy/vim-illuminate",
opts = {
delay = 200,
large_file_cutoff = 2000,
large_file_overrides = {
providers = { "lsp" },
},
},
config = function(_, opts)
require("illuminate").configure(opts)
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
end
map("]]", "next")
map("[[", "prev")
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local buffer = vim.api.nvim_get_current_buf()
map("]]", "next", buffer)
map("[[", "prev", buffer)
end,
})
end,
keys = {
{ "]]", desc = "Next Reference" },
{ "[[", desc = "Prev Reference" },
},
},
-- buffer remove
{
"echasnovski/mini.bufremove",
keys = {
{
"<leader>bd",
function()
local bd = require("mini.bufremove").delete
if vim.bo.modified then
local choice = vim.fn.confirm(("Save changes to %q?"):format(vim.fn.bufname()),
"&Yes\n&No\n&Cancel")
if choice == 1 then -- Yes
vim.cmd.write()
bd(0)
elseif choice == 2 then -- No
bd(0, true)
end
else
bd(0)
end
end,
desc = "Delete Buffer",
},
-- stylua: ignore
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
},
},
-- better diagnostics list and others
{
"folke/trouble.nvim",
cmd = { "TroubleToggle", "Trouble" },
opts = { use_diagnostic_signs = true },
keys = {
{ "<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" },
{ "<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" },
{ "<leader>xL", "<cmd>TroubleToggle loclist<cr>", desc = "Location List (Trouble)" },
{ "<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", desc = "Quickfix List (Trouble)" },
{
"[q",
function()
if require("trouble").is_open() then
require("trouble").previous({ 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
vim.notify(err, vim.log.levels.ERROR)
end
end
end,
desc = "Next trouble/quickfix item",
},
},
},
-- Finds and lists all of the TODO, HACK, BUG, etc comment
-- in your project and loads them into a browsable list.
{
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },
config = true,
-- stylua: ignore
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
},
},
}

View File

@ -0,0 +1,157 @@
return {
-- lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"onsails/lspkind.nvim",
"lukas-reineke/lsp-format.nvim",
},
opts = {
-- options for vim.diagnostic.config()
diagnostics = {
underline = true,
update_in_insert = false,
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "",
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
-- prefix = "icons",
},
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
},
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
-- Be aware that you also will need to properly configure your LSP server to
-- provide the inlay hints.
inlay_hints = {
enabled = false,
},
},
config = function(_, opts)
local lsp= require('lspconfig')
local lsp_defaults = lsp.util.default_config
lsp_defaults.capabilities = vim.tbl_deep_extend(
'force',
lsp_defaults.capabilities,
require('cmp_nvim_lsp').default_capabilities()
)
local sign = function(o)
-- See :help sign_define()
vim.fn.sign_define(o.name, {
texthl = o.name,
text = o.text,
numhl = ''
})
end
sign({ name = 'DiagnosticSignError', text = '' })
sign({ name = 'DiagnosticSignWarn', text = '' })
sign({ name = 'DiagnosticSignHint', text = '' })
sign({ name = 'DiagnosticSignInfo', text = '' })
vim.diagnostic.config({
virtual_text = false,
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{ border = 'rounded' }
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{ border = 'rounded' }
)
vim.lsp.handlers["workspace/diagnostic/refresh"] = function(_, _, ctx)
local ns = vim.lsp.diagnostic.get_namespace(ctx.client_id)
pcall(vim.diagnostic.reset, ns)
return true
end
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*.go',
callback = function()
vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
end
})
require("lsp-format").setup {
html = {
exclude = { "html" }
}
}
local on_attach = function(client)
local bufmap = function(mode, lhs, rhs)
local opts = {buffer = true}
vim.keymap.set(mode, lhs, rhs, opts)
end
require("lsp-format").on_attach(client)
bufmap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
bufmap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
bufmap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
bufmap('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
bufmap('n', 'gA', '<cmd>Telescope diagnostics<cr>')
bufmap('n', 'gr', '<cmd>Telescope lsp_references<cr>')
bufmap('n', 'gi', '<cmd>Telescope lsp_implementations<cr>')
bufmap('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>')
bufmap('n', '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>')
bufmap('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
bufmap('x', '<F4>', '<cmd>lua vim.lsp.buf.range_code_action()<cr>')
bufmap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<cr>')
bufmap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
end
lsp.gopls.setup {
settings = {
gopls = {
analyses = {
unusedparams = true,
unusedvariable = true,
shadow = true
},
staticcheck = true,
},
},
on_attach = on_attach
}
lsp.clangd.setup { on_attach = on_attach }
lsp.ltex.setup {
on_attach = on_attach,
filetypes = { "latex", "tex", "bib", "mkd", "gitcommit", "text" },
}
lsp.svelte.setup { on_attach = on_attach }
lsp.tsserver.setup { on_attach = on_attach }
lsp.lua_ls.setup {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
},
}
},
on_attach = on_attach
}
end
}
}

View File

@ -9,10 +9,10 @@ return {
opts = { opts = {
take_over_my_home = true, take_over_my_home = true,
auto_set_filetype = true, auto_set_filetype = true,
home = "/Users/jan/doc/zettelkasten", home = "{{ .home }}/doc/zettelkasten",
dailies = "/Users/jan/doc/zettelkasten/daily", dailies = "{{ .home }}/doc/zettelkasten/daily",
weeklies = "/Users/jan/doc/zettelkasten/weekly", weeklies = "{{ .home }}/doc/zettelkasten/weekly",
templates = "/Users/jan/doc/zettelkasten/templates", templates = "{{ .home }}/doc/zettelkasten/templates",
image_subdir = "img", image_subdir = "img",
extension = ".md", extension = ".md",
new_note_filename = "uuid-title", new_note_filename = "uuid-title",
@ -25,15 +25,15 @@ return {
-- template for new notes (new_note, follow_link) -- template for new notes (new_note, follow_link)
-- set to `nil` or do not specify if you do not want a template -- set to `nil` or do not specify if you do not want a template
template_new_note = "/Users/jan/doc/zettelkasten/templates/new_note.md", template_new_note = "{{ .home }}/doc/zettelkasten/templates/new_note.md",
-- template for newly created daily notes (goto_today) -- template for newly created daily notes (goto_today)
-- set to `nil` or do not specify if you do not want a template -- set to `nil` or do not specify if you do not want a template
template_new_daily = "/Users/jan/doc/zettelkasten/templates/daily.md", template_new_daily = "{{ .home }}/doc/zettelkasten/templates/daily.md",
-- template for newly created weekly notes (goto_thisweek) -- template for newly created weekly notes (goto_thisweek)
-- set to `nil` or do not specify if you do not want a template -- set to `nil` or do not specify if you do not want a template
template_new_weekly = "/Users/jan/doc/zettelkasten/templates/weekly.md", template_new_weekly = "{{ .home }}/doc/zettelkasten/templates/weekly.md",
-- image link style -- image link style
-- wiki: ![[image name]] -- wiki: ![[image name]]

View File

@ -0,0 +1,103 @@
return {
-- Treesitter is a new parser generator tool that we can
-- use in Neovim to power faster and more accurate
-- syntax highlighting.
{
"nvim-treesitter/nvim-treesitter",
version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate",
event = { "VeryLazy" },
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
config = function()
-- When in diff mode, we want to use the default
-- vim text objects c & C instead of the treesitter ones.
local move = require("nvim-treesitter.textobjects.move") ---@type table<string,fun(...)>
local configs = require("nvim-treesitter.configs")
for name, fn in pairs(move) do
if name:find("goto") == 1 then
move[name] = function(q, ...)
if vim.wo.diff then
local config = configs.get_module("textobjects.move")
[name] ---@type table<string,string>
for key, query in pairs(config or {}) do
if q == query and key:find("[%]%[][cC]") then
vim.cmd("normal! " .. key)
return
end
end
end
return fn(q, ...)
end
end
end
end,
},
},
cmd = { "TSUpdateSync" },
keys = {
{ "<c-space>", desc = "Increment selection" },
{ "<bs>", desc = "Decrement selection", mode = "x" },
},
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"yaml",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
textobjects = {
move = {
enable = true,
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" },
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" },
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" },
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
},
},
},
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
local added = {}
opts.ensure_installed = vim.tbl_filter(function(lang)
if added[lang] then
return false
end
added[lang] = true
return true
end, opts.ensure_installed)
end
require("nvim-treesitter.configs").setup(opts)
end,
},
}

View File

@ -1,38 +0,0 @@
return {
-- change lualine
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
opts.sections.lualine_b = { { "branch", icon = "" } }
end,
},
{
"RRethy/vim-illuminate",
config = function()
-- change the highlight style
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
end,
},
{
"NvChad/nvim-colorizer.lua",
opts = function(_, opts)
opts.filetypes = {
"html",
"css",
"scss",
"javascript",
"typescript",
"typescriptreact",
"javascriptreact",
"lua",
}
opts.user_default_options = {
mode = "background",
tailwind = false, -- Enable tailwind colors
}
end,
},
}

View File

@ -0,0 +1,247 @@
return {
{{- if eq .chezmoi.os "openbsd" }}
-- Better `vim.notify()`
{
"rcarriga/nvim-notify",
keys = {
{
"<leader>un",
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Dismiss all Notifications",
},
},
opts = {
timeout = 3000,
max_height = function()
return math.floor(vim.o.lines * 0.75)
end,
max_width = function()
return math.floor(vim.o.columns * 0.75)
end,
},
},
-- better vim.ui
{
"stevearc/dressing.nvim",
lazy = true,
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...)
end
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...)
end
end,
},
-- statusline
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
init = function()
vim.g.lualine_laststatus = vim.o.laststatus
vim.o.laststatus = 0
end,
opts = {
icons_enabled = true,
theme = 'auto',
component_separators = '|',
section_separators = '',
},
},
-- Active indent guide and indent text objects. When you're browsing
-- code, this highlights the current level of indentation, and animates
-- the highlighting.
{
"echasnovski/mini.indentscope",
version = false, -- wait till new 0.7.0 release to put it back on semver
opts = {
-- symbol = "▏",
symbol = "│",
options = { try_as_border = true },
},
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"help",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"lazy",
"mason",
"notify",
"toggleterm",
"lazyterm",
},
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end,
},
-- Displays a popup with possible key bindings of the command you started typing
{
"folke/which-key.nvim",
opts = function(_, opts)
opts.defaults["<leader>sn"] = { name = "+noice" }
end,
},
-- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
routes = {
{
filter = {
event = "msg_show",
any = {
{ find = "%d+L, %d+B" },
{ find = "; after #%d+" },
{ find = "; before #%d+" },
},
},
view = "mini",
},
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
inc_rename = true,
},
},
-- stylua: ignore
keys = {
{
"<S-Enter>",
function() require("noice").redirect(vim.fn.getcmdline()) end,
mode = "c",
desc =
"Redirect Cmdline"
},
{
"<leader>snl",
function() require("noice").cmd("last") end,
desc =
"Noice Last Message"
},
{
"<leader>snh",
function() require("noice").cmd("history") end,
desc =
"Noice History"
},
{
"<leader>sna",
function() require("noice").cmd("all") end,
desc =
"Noice All"
},
{
"<leader>snd",
function() require("noice").cmd("dismiss") end,
desc =
"Dismiss All"
},
{
"<c-f>",
function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,
silent = true,
expr = true,
desc =
"Scroll forward",
mode = {
"i", "n", "s" }
},
{
"<c-b>",
function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end,
silent = true,
expr = true,
desc =
"Scroll backward",
mode = {
"i", "n", "s" }
},
},
},
-- -- lsp symbol navigation for lualine. This shows where
-- in the code structure you are - within functions, classes,
-- etc - in the statusline.
{
"SmiteshP/nvim-navic",
lazy = true,
opts = function()
return {
separator = " ",
highlight = true,
depth_limit = 5,
lazy_update_context = true,
}
end,
},
-- icons
{ "nvim-tree/nvim-web-devicons", lazy = true },
-- ui components
{ "MunifTanjim/nui.nvim", lazy = true },
{{ else }}
-- change lualine
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
opts.sections.lualine_b = { { "branch", icon = " " } }
end,
},
{{ end }}
{
"RRethy/vim-illuminate",
config = function()
-- change the highlight style
vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "Visual" })
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
end,
},
{
"NvChad/nvim-colorizer.lua",
opts = function(_, opts)
opts.filetypes = {
"html",
"css",
"scss",
"javascript",
"typescript",
"typescriptreact",
"javascriptreact",
"lua",
}
opts.user_default_options = {
mode = "background",
tailwind = false, -- Enable tailwind colors
}
end,
},
}

View File

@ -14,6 +14,10 @@
<execute>chrome --disk-cache-dir=/tmp/cache</execute> <execute>chrome --disk-cache-dir=/tmp/cache</execute>
</action> </item> </action> </item>
<separator/> <separator/>
<menu id="network-menu" label="network">
<menu id="wifi-list" label="Wifi configured" execute="doas /home/jan/.local/bin/nmctl --list" />
<menu id="wifi-scan" label="Wifi scan" execute="doas /home/jan/.local/bin/nmctl --scan" />
</menu>
<menu id="37" label="config"> <menu id="37" label="config">
<item label="openbox"> <action name="Execute"> <item label="openbox"> <action name="Execute">
<execute>obconf</execute> <execute>obconf</execute>
@ -21,7 +25,7 @@
<item label="printers"> <action name="Execute"> <item label="printers"> <action name="Execute">
<execute>system-config-printer</execute> <execute>system-config-printer</execute>
</action> </item> </action> </item>
<item label="reload config"> <action name="Reconfigure"/> </item> <item label="reload"> <action name="Reconfigure"/> </item>
<menu id="client-list-menu"/> <menu id="client-list-menu"/>
</menu> </menu>
<separator/> <separator/>
@ -29,7 +33,7 @@
<execute>slock</execute> <execute>slock</execute>
</action> </item> </action> </item>
<item label="sleep"> <action name="Execute"> <item label="sleep"> <action name="Execute">
<execute>sudo systemctl suspend</execute> <execute>doas systemctl suspend</execute>
</action> </item> </action> </item>
<item label="exit"> <action name="Exit"/> </item> <item label="exit"> <action name="Exit"/> </item>
</menu> </menu>

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>

142
dot_mbsyncrc Normal file
View File

@ -0,0 +1,142 @@
#################################
###### Account moebius ##########
#################################
IMAPAccount moebius
Host mail.moebiusband.org
User jan
PassCmd "keepassxc-cli show /home/jan/doc/private/Passwords.kdbx server/moebiusband.org -a password"
SSLType IMAPS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/cert.pem
# Remote storage
IMAPStore moebius-remote
Account moebius
# Local storage
MaildirStore moebius-local
Path ~/.mail/moebius/
Inbox ~/.mail/moebius/INBOX
Channel moebius-inbox
Master :moebius-remote:"INBOX"
Slave :moebius-local:INBOX
Create Both
Expunge Both
Channel moebius-archive
Master :moebius-remote:"Archive"
Slave :moebius-local:archive
Create Both
Expunge Both
Channel moebius-drafts
Master :moebius-remote:"Drafts"
Slave :moebius-local:drafts
Create Both
Expunge Both
Channel moebius-sent
Master :moebius-remote:"Sent"
Slave :moebius-local:sent
Create Both
Expunge Both
Channel moebius-trash
Master :moebius-remote:"Trash"
Slave :moebius-local:trash
Create Both
Expunge Both
#Channel moebius-junk
#Master :moebius-remote:"Junk"
#Slave :moebius-local:junk
#Create Both
#Expunge Both
Group moebius
Channel moebius-inbox
Channel moebius-archive
Channel moebius-drafts
Channel moebius-sent
Channel moebius-trash
#Channel moebius-junk
#################################
######## Account fau ############
#################################
IMAPAccount fau
Host groupware.fau.de
User fauad\\unrz254
PassCmd "gopass show sso/rrze"
SSLType STARTTLS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/cert.pem
# Remote storage
IMAPStore fau-remote
Account fau
# Local storage
MaildirStore fau-local
Path ~/.mail/fau/
Inbox ~/.mail/fau/INBOX
Channel fau
Master :fau-remote:
Slave :fau-local:
Patterns * !Calendar !Contacts "!Suggested Contacts"
Create Both
SyncState *
#################################
####### Account gmail ###########
#################################
IMAPAccount gmail
Host imap.gmail.com
User jan.treibig@gmail.com
PassCmd "keepassxc-cli show /home/jan/doc/private/Passwords.kdbx sso/Google -a password"
SSLType IMAPS
CertificateFile /etc/ssl/cert.pem
IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Subfolders Verbatim
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/INBOX
Channel sync-googlemail-default
Master :gmail-remote:
Slave :gmail-local:
Patterns "INBOX"
Create Slave
Channel sync-googlemail-sent
Master :gmail-remote:"[Gmail]/Sent Mail"
Slave :gmail-local:sent
Create Slave
Channel sync-googlemail-archive
Master :gmail-remote:"[Gmail]/All Mail"
Slave :gmail-local:archive
Create Slave
# Get all the channels together into a group.
Group gmail
Channel sync-googlemail-default
Channel sync-googlemail-sent
Channel sync-googlemail-archive
#Channel gmail
#Master :gmail-remote:
#Slave :gmail-local:
#Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
#Sync Pull
#Create Slave
#SyncState *

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,15 +25,51 @@ 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'
export GOPATH=$HOME/go export GOPATH=$HOME/go
{{- if eq .chezmoi.os "openbsd" }}
export PORTSDIR_PATH=/usr/ports/:/usr/ports/openbsd-wip
export PATH="$HOME/dev/src/ltex-ls-15.2.0/bin:$HOME/local/bin:$HOME/perl5/bin:$HOME/gems/bin:$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
export PERL5LIB=$HOME/perl5/lib/perl5
export PERL_LOCAL_LIB_ROOT=$HOME/perl5
export PERL_MB_OPT='--install_base "/home/jan/perl5"'
export PERL_MM_OPT='INSTALL_BASE=/home/jan/perl5'
export JAVA_HOME=/usr/local/jdk-11/
export PMIX_MCA_gds='hash'
alias top='htop'
alias ctags='uctags'
alias make='gmake'
alias tar='gtar'
alias man='manpager.sh'
alias mutt='neomutt'
alias dvim='doas nvim'
alias ic='doas ifconfig'
alias pq='doas pkg_info -Q'
alias pa='doas pkg_add'
alias pd='doas pkg_delete'
alias lpr='/usr/local/bin/lpr'
alias gpget='gopass -c'
alias ruby='ruby30'
alias gem='gem30'
alias bundle='bundle30'
alias mnt-net='doas mount_nfs -3 -a 4 -T -r 32768 -o noatime,nodev,noexec 192.168.178.10:/volume1/Data /mnt/nfs'
alias umnt-net='doas umount /mnt/nfs'
alias mnt-usb='doas mount /dev/sd1i /mnt/usb'
alias umnt-usb='doas umount /mnt/usb'
alias mnt-secret='doas mount dev/sd1c /mnt/encrypted_usb'
alias umnt-secret='doas unmount /mnt/encrypted_usb'
alias bkp-home='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup --one-file-system /home/jan --exclude /home/jan/data'
alias bkp-etc='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup /etc'
alias bkp-list='doas restic -r /mnt/nfs/BSD/restic-repo snapshots'
{{- else }}
{{ if eq .chezmoi.os "darwin" }} {{ if eq .chezmoi.os "darwin" }}
source $HOME/perl5/perlbrew/etc/bashrc source $HOME/perl5/perlbrew/etc/bashrc
{{- if eq .chezmoi.arch "arm64" }} {{- if eq .chezmoi.arch "arm64" }}
export PATH=/opt/homebrew/bin:$PATH export PATH=/opt/homebrew/bin:$PATH
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}

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 }}
@ -40,5 +38,6 @@ xidle -timeout 300 -program "/usr/local/bin/slock" &
xrdb -merge $HOME/.Xresources xrdb -merge $HOME/.Xresources
xsetroot -solid "#282828" xsetroot -solid "#282828"
urxvtd -q -f -o urxvtd -q -f -o
tint2&
exec openbox exec openbox