Compare commits

9 Commits
Author SHA1 Message Date
roodletoof 4b2f5f9429 simpler build
includes test. somehow failing tests are not part of the result??
possibly overwrite the errorformat?
2026-10-15 20:09:26 +02:00
roodletoof 08d0d18b89 support file level structs in zig 2026-10-15 19:19:31 +02:00
roodletoof 26d35c355b add zig ctags regexes 2026-10-15 18:18:45 +02:00
roodletoof 28cd17645b update lazy.lock 2026-10-11 15:52:26 +02:00
roodletoof 887ae4d316 make popup use the same colors 2026-10-09 17:20:13 +02:00
roodletoof dfc4647fe0 odin compiler support vim 2026-10-08 21:01:20 +02:00
roodletoof 1f0e1c47af use standard library in sesh to make directories instead of mkdir program 2026-10-08 20:19:06 +02:00
roodletoof aa35fb57b2 update lazy.lock 2026-10-08 20:00:48 +02:00
Ivar Fatland be650592a3 move screenshot paste into own plugin 2026-10-07 21:21:55 +02:00
8 changed files with 59 additions and 47 deletions
+13
View File
@@ -0,0 +1,13 @@
--langdef=zig
--map-zig=.zig
--kinddef-zig=f,function,functions
--kinddef-zig=m,method,methods
--kinddef-zig=t,type,types
--kinddef-zig=v,field,fields
--regex-zig=/^(export +)?(pub +)?(inline +)?fn +([a-zA-Z0-9_]+)/\4/f/{exclusive}
--regex-zig=/^(export +)?(pub +)?[\t ]*const +([a-zA-Z0-9_]+) = (@This\(\)|struct|enum|union)/\3/t/{exclusive}{scope=push}
--regex-zig=/^}///{exclusive}{scope=pop}{placeholder}
--regex-zig=/^[\t ]+(pub +)?(inline +)?fn +([a-zA-Z0-9_]+)/\3/m/{exclusive}{scope=ref}
--regex-zig=/^(export +)?pub +const +([a-zA-Z0-9_]+)(:.*)? = .*/\2/v/{exclusive}
+1 -6
View File
@@ -7,12 +7,7 @@ let current_compiler = "zig"
let s:save_cpo = &cpo
set cpo&vim
" a subcommand must be provided for the this compiler (test, build-exe, etc)
if has('patch-7.4.191')
CompilerSet makeprg=zig\ \$*\ \%:S
else
CompilerSet makeprg=zig\ \$*\ \"%\"
endif
CompilerSet makeprg=zig\ build\ test\ &&\ zig\ build\ run
" TODO: improve errorformat as needed.
-29
View File
@@ -596,32 +596,3 @@ require'lazy'.setup{ --{{{1
},
}
do --screenshot paste {{{1
local function save_clipboard_image()
local is_mac = vim.fn.has("mac")
if not is_mac then
error("only supported for mac")
end
local filename = vim.fn.input("image name: ")
local path = filename .. ".png"
local cmd = "pngpaste " .. vim.fn.shellescape(path)
local res = os.execute(cmd)
if res == 0 then
print("saved image to ".. path)
else
error("failed to save image")
end
local row, _ = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_buf_set_lines(0, row, row, false, {
"!["..filename.."]("..path..")"
})
end
vim.keymap.set(
'n',
',q',
save_clipboard_image,
{}
)
end
+4 -4
View File
@@ -2,21 +2,21 @@
"git-blame.nvim": { "branch": "main", "commit": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "b5576cd62899a1a478d0e67ef3d378ee55dba82d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e17625cdc8c2650787467398e02c5d63a2cde966" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mini.align": { "branch": "main", "commit": "77d7446b9f2452193f13ced9fb73a8b3aa4a4f4d" },
"moonfly": { "branch": "master", "commit": "2c883835f5b7b380a0a9e80695c420f7efebdfe4" },
"nvim-dap": { "branch": "master", "commit": "c9a0738e45f1bd41d792a126941348dce661cf9b" },
"nvim-dap": { "branch": "master", "commit": "cfa2d58f4537aca6ca83e2de1a0d9f1491121264" },
"nvim-dap-cs": { "branch": "main", "commit": "16e5debe8cb7fb73c8799d20969ee00883586602" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-lspconfig": { "branch": "master", "commit": "84b6b6c3f13cb34a6c8a0354b0da4c67d8ccf867" },
"nvim-lspconfig": { "branch": "master", "commit": "c59fc922f718fa055f69f5f3bc888f23211571eb" },
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"roslyn.nvim": { "branch": "main", "commit": "bf1bd4e70bc7068d1b4aebf4ce03cc19a86615be" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"tree-sitter-manager.nvim": { "branch": "main", "commit": "1425eacb78bfee34face0fe06a8384ac3c4d9c8e" },
"tree-sitter-manager.nvim": { "branch": "main", "commit": "d93782393d7d4b48ddbdbcb0fdff6f8cb8d7043a" },
"vim-indent-object": { "branch": "master", "commit": "8ab36d5ec2a3a60468437a95e142ce994df598c6" }
}
@@ -0,0 +1,27 @@
local function save_clipboard_image()
local is_mac = vim.fn.has("mac")
if not is_mac then
error("only supported for mac")
end
local filename = vim.fn.input("image name: ")
local path = filename .. ".png"
local cmd = "pngpaste " .. vim.fn.shellescape(path)
local res = os.execute(cmd)
if res == 0 then
print("saved image to ".. path)
else
error("failed to save image")
end
local row, _ = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_buf_set_lines(0, row, row, false, {
"!["..filename.."]("..path..")"
})
end
vim.keymap.set(
'n',
',q',
save_clipboard_image,
{}
)
+1 -8
View File
@@ -55,7 +55,6 @@ type Config map[string][]Window
const (
tmux = "tmux"
mkdir = "mkdir"
)
func main() {
@@ -64,11 +63,6 @@ func main() {
panic(err)
}
_, err = exec.LookPath(mkdir)
if err != nil {
panic(err)
}
homeDir, err := os.UserHomeDir()
if err != nil {
panic(err)
@@ -161,8 +155,7 @@ func main() {
return
}
for _, window := range sesh {
// TODO: use go stdandard library instead
exec.Command(mkdir, "-p", window.ExpandedPath()).Run()
_ = os.MkdirAll(window.ExpandedPath(), 0775);
}
for _, window := range sesh {
NewWindowInSession(seshName, window)
+2
View File
@@ -56,3 +56,5 @@ set -g message-style "fg=${gray_medium},bg=default"
set -g mode-style "fg=${gray_dark},bg=${blue_muted}"
set -g pane-border-style "fg=${gray_dark}"
set -g pane-active-border-style "fg=${gray_medium}"
set -g popup-style "bg=default,fg=default"
set -g popup-border-style "bg=default,fg=default"
+11
View File
@@ -0,0 +1,11 @@
let current_compiler = "odin"
let s:save_cpo = &cpo
set cpo&vim
CompilerSet makeprg=odin\ build\ .
CompilerSet errorformat=
\%f(%l:%c)\ Syntax\ %trror:\ %m
let &cpo = s:save_cpo
unlet s:save_cpo