This commit is contained in:
kento2 2026-09-10 02:23:49 +02:00
parent 343a08d1a8
commit 997a1ced71
6 changed files with 51 additions and 5 deletions

View file

@ -9,7 +9,8 @@ bspc config split_ratio 0.55
bspc config borderless_monocle true bspc config borderless_monocle true
bspc config gapless_monocle true bspc config gapless_monocle true
bspc rule -a mpv desktop='^8' state=floating follow=on bspc rule -a mpv state=floating
bspc rule -a spotify desktop='^8'
bspc rule -a librewolf desktop='^5' bspc rule -a librewolf desktop='^5'
bspc config focus_follows_pointer true bspc config focus_follows_pointer true

View file

@ -1,7 +1,8 @@
{ {
"LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "friendly-snippets": { "branch": "main", "commit": "a5a73e586521fe5c12d751ad81a0db67649a94ed" },
"fzf.vim": { "branch": "master", "commit": "d2a59a992a2455f609c0fde2ebd84427ea8f919a" }, "fzf.vim": { "branch": "master", "commit": "8a0068127ac9ee23d71dab2944ce995726bef462" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"nvim-lspconfig": { "branch": "master", "commit": "c8a582abc20a3121a768073df569d088cb5604b5" } "nvim-lspconfig": { "branch": "master", "commit": "84b6b6c3f13cb34a6c8a0354b0da4c67d8ccf867" }
} }

View file

@ -20,3 +20,5 @@ vim.lsp.enable('rust_analyzer')
vim.keymap.set("n", "<leader>l", function() vim.keymap.set("n", "<leader>l", function()
vim.lsp.buf.format({ async = true }) vim.lsp.buf.format({ async = true })
end, { desc = "Format buffer" }) end, { desc = "Format buffer" })
require("luasnip.loaders.from_lua").load({paths = "~/.config/nvim/lua/snippet"})

View file

@ -7,9 +7,15 @@ return {
{ {
'saghen/blink.cmp', 'saghen/blink.cmp',
dependencies = { 'rafamadriz/friendly-snippets' }, dependencies = {
'rafamadriz/friendly-snippets',
'L3MON4D3/LuaSnip',
},
version = '1.*', version = '1.*',
opts = { opts = {
snippets = {
preset = 'luasnip',
},
keymap = { keymap = {
preset = 'super-tab', preset = 'super-tab',
['<C-u>'] = { 'scroll_signature_up', 'fallback' }, ['<C-u>'] = { 'scroll_signature_up', 'fallback' },

View file

@ -0,0 +1,35 @@
return {
require("luasnip").snippet(
{ trig = "mainopt" },
{
t({
"#include <libowfat/errmsg.h>",
"",
"#define dieusage() die(100,argv0,TODO)",
"#define dienoarg(OPT) \\",
" do { \\",
" carp(\"missing argument for -\"OPT); \\",
" dieusage(); \\",
" } while(0)",
"",
"int main(int argc, char **argv)",
"{",
" int i;",
" errmsg_iam(*argv);",
" for (i=1;i<argc;i++) {",
" if (argv[i][0]!='-') break;",
" if (argv[i][1]=='-' && !argv[i][2]) break;",
" switch (argv[i][1]) {",
" ",
}),
require("luasnip").insert_node(1, ""),
t({
"",
" default: dieusage();",
" }",
" }",
" argc-=i; argv+=i;",
}),
}
),
}

View file

@ -33,3 +33,4 @@ test -d ~/Downloads && rmdir ~/Downloads
. /usr/share/fzf/completion.zsh . /usr/share/fzf/completion.zsh
. /usr/share/fzf/key-bindings.zsh . /usr/share/fzf/key-bindings.zsh
. ~/.priv/labshare