aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2025-02-09 10:54:12 -0500
committerAlec Goncharow <alec@goncharow.dev>2025-02-09 10:54:12 -0500
commit143847c01930c4e7e0283c019002a95193175557 (patch)
tree99a6a9462a496f8abef875331c29836b18b31780
parent78efc3eb493b40ad2f79408a47bb873b5eea9db0 (diff)
many things.
-rw-r--r--.config/nvim/init.lua2
-rw-r--r--.config/nvim/lazy-lock.json7
-rw-r--r--.config/nvim/lua/autocomplete.lua21
-rw-r--r--.config/nvim/lua/fzf.lua1
-rw-r--r--.config/nvim/lua/lsp.lua30
-rw-r--r--.config/nvim/lua/lspsaga_conf.lua2
-rw-r--r--.config/nvim/lua/mappings.lua58
-rw-r--r--.config/nvim/lua/plugins.lua34
-rw-r--r--.config/nvim/lua/treesitter.lua2
-rw-r--r--.config/sway/config46
-rw-r--r--.config/zls.json4
-rw-r--r--.gitignore3
-rw-r--r--.zshrc2
-rwxr-xr-xbin/clamshell-toggle4
-rwxr-xr-xbin/screenshot6
15 files changed, 168 insertions, 54 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index ce6583c..08d4c48 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -33,3 +33,5 @@ require('neorg_conf') -- note taking
if vim.g.neovide then
require('neovide_conf')
end
+
+require('leap').create_default_mappings()
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json
index b23d43c..829401d 100644
--- a/.config/nvim/lazy-lock.json
+++ b/.config/nvim/lazy-lock.json
@@ -12,10 +12,12 @@
"go.nvim": { "branch": "master", "commit": "cde0c7a110c0f65b9e4e6baf342654268efff371" },
"jai.vim": { "branch": "master", "commit": "72c09c5f803b8ab2e708a3ad2b7c3704e2b4b3d8" },
"lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" },
+ "leap.nvim": { "branch": "main", "commit": "c6bfb191f1161fbabace1f36f578a20ac6c7642c" },
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
"lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
+ "marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" },
"neorg": { "branch": "main", "commit": "ace80b05771b65d6633f3c64b8d930b5787f20d0" },
"nerdcommenter": { "branch": "master", "commit": "7bb1f72e802a80e37bdda5f6906c69b5a93de1eb" },
"netrw.nvim": { "branch": "master", "commit": "c64f60b8a613900aad82ef1c285b892eb43e9e15" },
@@ -28,6 +30,7 @@
"nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
"nvim-treesitter": { "branch": "master", "commit": "ebdffa78bdb16af84fb76ff6a75978496d4dcbec" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
+ "odin.vim": { "branch": "master", "commit": "e7ce5f9d1804273986c661132de19798b0b2b267" },
"oil.nvim": { "branch": "master", "commit": "10fbfdd37b6904c0776c5db1a27ab47eecba335e" },
"pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
@@ -37,6 +40,7 @@
"templ.vim": { "branch": "main", "commit": "5cc48b93a4538adca0003c4bc27af844bb16ba24" },
"text-case.nvim": { "branch": "main", "commit": "ec9925b27dd54809653cc766b8673acd979a888e" },
"tmuxline.vim": { "branch": "master", "commit": "4119c553923212cc67f4e135e6f946dc3ec0a4d6" },
+ "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
"vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-ember-hbs": { "branch": "master", "commit": "777095c1b25f334cef9db5504c7d409d52843aa9" },
@@ -48,9 +52,8 @@
"vim-matchup": { "branch": "master", "commit": "1535a769d5dca851fe7d41b0be95f7c7203a4bef" },
"vim-radical": { "branch": "master", "commit": "aca8992a25d317a4c6fa42e263e8506ea3e355d8" },
"vim-repeat": { "branch": "master", "commit": "5bd4c87a1417a7187d0329e81eb83514ee481250" },
- "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" },
"vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" },
"zen-mode.nvim": { "branch": "main", "commit": "21976479c7a0146b05a42707cf91c86b1e510945" },
"zig.vim": { "branch": "master", "commit": "54c216e5306a5c3878a60596aacb94dca8652ab9" }
-} \ No newline at end of file
+}
diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua
index 4ada86b..58af67f 100644
--- a/.config/nvim/lua/autocomplete.lua
+++ b/.config/nvim/lua/autocomplete.lua
@@ -1,6 +1,7 @@
-- Set up nvim-cmp.
local cmp = require 'cmp'
+
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
@@ -11,11 +12,12 @@ cmp.setup({
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
},
- experimental = {
- ghost_text = {
- hl_group = "CmpGhostText",
- },
- },
+ -- can't figure this out, could be cool if ghost text actually took on different color
+ -- experimental = {
+ -- ghost_text = {
+ -- hl_group = "CmpGhostText",
+ -- },
+ -- },
window = {
completion = cmp.config.window.bordered({ border = 'none' }),
documentation = cmp.config.window.bordered({ border = 'none' }),
@@ -23,8 +25,8 @@ cmp.setup({
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
- ['<C-y>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- ['<C-e>'] = cmp.mapping.abort(),
+ ['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
+ ['<C-c>'] = cmp.mapping.complete(),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
@@ -35,7 +37,10 @@ cmp.setup({
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
- })
+ }),
+ completion = {
+ autocomplete = false,
+ }
})
-- Set configuration for specific filetype.
diff --git a/.config/nvim/lua/fzf.lua b/.config/nvim/lua/fzf.lua
index 170158a..21341f1 100644
--- a/.config/nvim/lua/fzf.lua
+++ b/.config/nvim/lua/fzf.lua
@@ -1,5 +1,6 @@
local fzf = require('fzf-lua')
vim.keymap.set('n', '<c-b>', fzf.buffers, {})
+vim.keymap.set('n', '<c-m>', fzf.marks, {})
vim.keymap.set('n', '<leader>fb', fzf.lines, {})
vim.keymap.set('n', '<leader>ff', fzf.files, {})
vim.keymap.set('n', '<leader>fg', fzf.live_grep, {})
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index 55e70cc..c417026 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -58,7 +58,6 @@ local lspconfig = require('lspconfig')
lspconfig.zls.setup({
on_attach = on_attach,
capabilities = capabilities,
-
})
lspconfig.bashls.setup({
@@ -142,6 +141,35 @@ lspconfig.sqls.setup {
},
}
+-- local lsp = require 'lspconfig'
+-- local configs = require 'lspconfig.configs'
+
+-- if not configs.jai_lsp then
+-- configs.jai_lsp = {
+-- default_config = {
+-- cmd = { 'jails' },
+-- filetypes = { 'jai' },
+-- }
+-- }
+-- end
+
+-- lspconfig.jai_lsp.setup({
+-- on_attach = on_attach,
+-- capabilities = capabilities,
+-- })
+
+lspconfig.ols.setup({
+ on_attach = on_attach,
+ capabilities = capabilities,
+ init_options = {
+ enable_references = true,
+ enable_rename = true,
+ enable_semantic_tokens = true,
+ enable_checker_only_saved = true,
+ enable_inlay_hints = true,
+ }
+})
+
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*.go',
callback = function()
diff --git a/.config/nvim/lua/lspsaga_conf.lua b/.config/nvim/lua/lspsaga_conf.lua
index 73d5695..b31aeff 100644
--- a/.config/nvim/lua/lspsaga_conf.lua
+++ b/.config/nvim/lua/lspsaga_conf.lua
@@ -88,7 +88,7 @@ require('lspsaga').setup({
},
})
-Nmap('<c-e>', ':Lspsaga outline<CR>')
+Nmap('<c-l>', ':Lspsaga outline<CR>')
-- Nmap('<c-d>', ':Lspsaga show_buf_diagnostics<CR>')
Nmap('<c-w>', ':Lspsaga show_buf_diagnostics<CR>')
Nmap('<c-a>', ':Lspsaga code_action<CR>')
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua
index 838ba4f..e6c34ca 100644
--- a/.config/nvim/lua/mappings.lua
+++ b/.config/nvim/lua/mappings.lua
@@ -25,20 +25,56 @@ function Tmap(shortcut, command)
Map('t', shortcut, command)
end
---- pane nav
-Nmap("<c-k>", ":wincmd k<CR>")
-Nmap("<c-j>", ":wincmd j<CR>")
-Nmap("<c-h>", ":wincmd h<CR>")
-Nmap("<c-l>", ":wincmd l<CR>")
+-- pane nav
+Nmap("<leader>u", ":wincmd k<CR>")
+Nmap("<leader>e", ":wincmd j<CR>")
+Nmap("<leader>n", ":wincmd h<CR>")
+Nmap("<leader>i", ":wincmd l<CR>")
---- pane resize
-Nmap("_", ":resize -1<CR>")
-Nmap("+", ":resize +1<CR>")
+-- -- pane resize
+-- Nmap("_", ":resize -1<CR>")
+-- Nmap("+", ":resize +1<CR>")
-- pane spawn
-Nmap("t", ':split<CR>:wincmd j<CR>:term<CR>')
-Nmap("s", ':vs<CR>:wincmd l<CR>')
-Nmap("<c-s>", ':only<CR>')
+Nmap("<leader>t", ':split<CR>:wincmd j<CR>:term<CR>')
+Nmap("<leader>s", ':vs<CR>:wincmd l<CR>')
+Nmap("<leader>wo", ':only<CR>')
-- escape terminal mode easier
Tmap('<Esc>', '<C-\\><C-n>')
+
+
+-- yoinked from https://github.com/dycw/dotfiles/blob/master/nvim/lua/keymaps.lua
+local function merge_tables(t1, t2)
+ local result = {}
+ for key, value in pairs(t1) do
+ result[key] = value
+ end
+ for key, value in pairs(t2) do
+ result[key] = value
+ end
+ return result
+end
+
+local keymap_opts = { noremap = true, silent = true }
+
+local keymap_set = function(mode, lhs, rhs, desc)
+ vim.keymap.set(mode, lhs, rhs, merge_tables(keymap_opts, { desc = desc }))
+end
+-- command
+keymap_set("n", ";", ":", "Command")
+
+-- global marks
+local prefixes = "m'"
+local letters = "abcdefghijklmnopqrstuvwxyz"
+for i = 1, #prefixes do
+ local prefix = prefixes:sub(i, i)
+ for j = 1, #letters do
+ local lower_letter = letters:sub(j, j)
+ local upper_letter = string.upper(lower_letter)
+ keymap_set({ "n", "v" }, prefix .. lower_letter, prefix .. upper_letter, "Mark " .. upper_letter)
+ end
+end
+
+-- paste in insert mode
+keymap_set("i", "<C-v>", "<C-o>p", "Paste")
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 7bd8b20..a68da80 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -46,7 +46,7 @@ return require('lazy').setup({
'scrooloose/nerdcommenter', -- commenting shortcuts
'tpope/vim-eunuch', -- wrappers UNIX commands
- 'tpope/vim-surround', -- surround characters shortcuts
+ --'tpope/vim-surround', -- surround characters shortcuts
'tpope/vim-endwise', -- wisely add
'tpope/vim-repeat', -- repeat for plugins
-- 'tpope/vim-vinegar', -- make explore better
@@ -88,6 +88,9 @@ return require('lazy').setup({
-- jai
'rluba/jai.vim',
+ -- Odin
+ 'Tetralux/odin.vim',
+
'johmsalas/text-case.nvim',
-- integer base conversions
@@ -107,4 +110,33 @@ return require('lazy').setup({
},
'mg979/vim-visual-multi',
+ {
+ "folke/todo-comments.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ opts = {
+ keywords = {
+ FIX = {
+ icon = " ", -- icon used for the sign, and in search results
+ color = "error", -- can be a hex color, or a named color (see below)
+ alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
+ -- signs = false, -- configure signs for some keywords individually
+ },
+ TODO = { icon = " ", color = "info", alt = { "nocheckin" } },
+ HACK = { icon = " ", color = "warning" },
+ WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
+ PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
+ NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
+ TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
+ },
+ }
+ },
+
+ -- movement
+ 'ggandor/leap.nvim',
+ {
+ "chentoast/marks.nvim",
+ event = "VeryLazy",
+ opts = {
+ },
+ },
})
diff --git a/.config/nvim/lua/treesitter.lua b/.config/nvim/lua/treesitter.lua
index b4e9b9b..011ea9f 100644
--- a/.config/nvim/lua/treesitter.lua
+++ b/.config/nvim/lua/treesitter.lua
@@ -1,6 +1,6 @@
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
- ensure_installed = { "rust", "c", "lua", "vim", "zig", "go" },
+ ensure_installed = { "rust", "c", "lua", "vim", "zig", "go", "odin" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
diff --git a/.config/sway/config b/.config/sway/config
index 271edd2..cecea05 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -26,10 +26,10 @@ font pango:Fira Mono 8
floating_modifier $mod
# start a terminal
-set $my-term alacritty
+set $my-term ghostty
bindsym $mod+Return exec --no-startup-id $my-term
bindsym $mod+t exec --no-startup-id $my-term
-bindsym $mod+n exec --no-startup-id neovide '+Notes'
+bindsym $mod+m exec --no-startup-id neovide '+Notes'
# kill focused window
bindsym $mod+Shift+q exec --no-startup-id ~/bin/safequit
@@ -38,10 +38,10 @@ bindsym $mod+Shift+q exec --no-startup-id ~/bin/safequit
bindsym $mod+d exec --no-startup-id fuzzel
# change focus
-bindsym $mod+h focus left
-bindsym $mod+j focus down
-bindsym $mod+k focus up
-bindsym $mod+l focus right
+bindsym $mod+n focus left
+bindsym $mod+e focus down
+bindsym $mod+u focus up
+bindsym $mod+i focus right
# alternatively, you can use the cursor keys:
#bindsym $mod+Left focus left
@@ -50,10 +50,10 @@ bindsym $mod+l focus right
#bindsym $mod+Right focus right
# move focused window
-bindsym $mod+Shift+h move left
-bindsym $mod+Shift+j move down
-bindsym $mod+Shift+k move up
-bindsym $mod+Shift+l move right
+bindsym $mod+Shift+n move left
+bindsym $mod+Shift+e move down
+bindsym $mod+Shift+u move up
+bindsym $mod+Shift+i move right
# alternatively, you can use the cursor keys:
#bindsym $mod+Shift+Left move left
@@ -70,7 +70,7 @@ bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
-bindsym $mod+e layout toggle split
+bindsym $mod+Shift+w layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
@@ -145,7 +145,7 @@ bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
-bindsym $mod+Shift+e exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit'"
+bindsym $mod+Shift+k exec "swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
@@ -176,7 +176,7 @@ bindsym $mod+r mode "resize"
mode "game" {
bindsym $mod+Shift+o mode "default"
}
-bindsym $mod+o mode "game"
+bindsym $mod+g mode "game"
# Walpaper
# exec --no-startup-id feh --bg-fill ~/Pictures/wallpaper.png
@@ -227,6 +227,7 @@ for_window {
[class="firefox"] border none
[app_id="firefox"] border none
[app_id="Alacritty"] border pixel 2
+ [app_id="com.mitchellh.ghostty"] border pixel 2
[app_id="neovide"] border pixel 2
[class="steam"] border none
[class="Godot"] floating enable
@@ -252,7 +253,7 @@ client.unfocused "#2c2c2c" "#2b2b2b" "#888888" "#000000" "#2c2c2c"
set $notify dunstify --timeout 1500
# Set your laptop screen name
-set $laptop_screen 'eDP-1'
+set $laptop_screen 'eDP-2'
# Clamshell mode or lock & sleep
# This is a if/else statement: [ outputs_count == 1 ] && true || false
@@ -260,27 +261,24 @@ bindswitch --reload --locked lid:on exec '[ $(swaymsg -t get_outputs | grep name
exec_always ~/bin/clamshell-toggle
bindswitch --reload --locked lid:off output $laptop_screen enable
-workspace 1 output 'LG Electronics LG ULTRAGEAR 107NTDVCR242' eDP-1
-workspace 2 output 'Dell Inc. DELL P2723QE 3940MP3' eDP-1
bindsym --release Print exec ~/bin/screenshot
bindsym --release Scroll_Lock exec ~/bin/memezoom
bindsym --release XF86AudioMedia exec ~/bin/memezoom
# Sway display things
-output 'LG Electronics LG ULTRAGEAR 107NTDVCR242' {
- position 1440,640
+output 'Dell Inc. Dell AW3821DW #G7QYMxgwAA+/' {
+ #position 0,0
+ #position 3840,0
+ position 2048,0
scale 1.0
+ mode 3840x1600@144Hz
}
-output 'Dell Inc. DELL P2723QE 3940MP3' {
- position 0,0
- scale 1.5
- transform 270
-}
output eDP-2 {
- position 4000,640
+ #position 3840,0
+ position 0,0
scale 1.25
}
diff --git a/.config/zls.json b/.config/zls.json
new file mode 100644
index 0000000..c6eeade
--- /dev/null
+++ b/.config/zls.json
@@ -0,0 +1,4 @@
+{
+ "enable_build_on_save": true,
+ "build_on_save_step": "check"
+}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..140b962
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+bin/odinfmt
+bin/ols
+bin/jails
diff --git a/.zshrc b/.zshrc
index 63eb35d..037cb09 100644
--- a/.zshrc
+++ b/.zshrc
@@ -143,7 +143,7 @@ alias cat=bat
alias find=fd
alias open=xdg-open
alias pls='sudo $(history -p !!)'
-alias jai="~/jai/bin/jai"
+alias jai=~/jai/bin/jai-linux
export PATH=~/bin:$PATH
export PATH=~/go/bin:$PATH
export PATH=~/.local/bin:$PATH
diff --git a/bin/clamshell-toggle b/bin/clamshell-toggle
index 12997e9..54496e0 100755
--- a/bin/clamshell-toggle
+++ b/bin/clamshell-toggle
@@ -1,6 +1,6 @@
#!/usr/bin/bash
if grep -q open /proc/acpi/button/lid/LID0/state; then
- swaymsg output eDP-1 enable
+ swaymsg output eDP-2 enable
else
- swaymsg output eDP-1 disable
+ swaymsg output eDP-2 disable
fi
diff --git a/bin/screenshot b/bin/screenshot
index 94e3bd3..3852fa5 100755
--- a/bin/screenshot
+++ b/bin/screenshot
@@ -12,11 +12,13 @@ FOCUSED=$(swaymsg -t get_tree | jq '.. | (.nodes? // empty)[] | select(.focused)
main() {
rect="$(slurp)"
if [ $? -eq 0 ]; then
- grim -g "$rect" -t png - | wl-copy -t image/png
+ grim -g "$rect" ~/screenshot.png
else
- grim -g "$(eval echo "$FOCUSED")" -t png - | wl-copy -t image/png
+ grim -g "$(eval echo "$FOCUSED")" ~/screenshot.png
+
fi
+ cat ~/screenshot.png | wl-copy -t image/png
}
main "$@"