zig
This commit is contained in:
@@ -8,7 +8,7 @@ wallpaper {
|
||||
|
||||
wallpaper {
|
||||
monitor = DP-2
|
||||
path = /home/mahalo/photos/wallhaven-8ggqqj.jpg
|
||||
path = /home/mahalo/photos/wallhaven-gw2gyq.png
|
||||
fit_mode = cover
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ hl.window_rule({ name = "ws-firefox", match = { class = "^(org.mozilla.firefox)$
|
||||
hl.window_rule({ name = "ws-waterfox", match = { class = "^(waterfox)$" }, workspace = 2 })
|
||||
hl.window_rule({ name = "ws-nemo", match = { class = "^(nemo)$" }, workspace = 3 })
|
||||
hl.window_rule({ name = "ws-vscodium", match = { title = "^(VSCodium)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "ws-jetbrains", match = { title = "^(jetbrains-idea)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "ws-jetbrains-idea", match = { class = "^(jetbrains-idea)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "ws-postman", match = { title = "^(Postman)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "ws-rstudio", match = { title = "^(RStudio)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "ws-obsidian", match = { class = "^(obsidian)$" }, workspace = 5 })
|
||||
|
||||
@@ -90,6 +90,12 @@ augroup END
|
||||
)
|
||||
|
||||
--'''''''''''''' Theme ''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
require("catppuccin").setup({
|
||||
integrations = {
|
||||
rainbow_delimiters = true,
|
||||
},
|
||||
})
|
||||
|
||||
local function force_backgraund(color)
|
||||
color = color or "catppuccin-mocha"
|
||||
vim.cmd.colorscheme(color)
|
||||
@@ -104,6 +110,7 @@ require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
filesystem = {
|
||||
hijack_netrw_behavior = "disabled",
|
||||
filtered_items = { hide_gitignored = false },
|
||||
},
|
||||
window = {
|
||||
width = 25,
|
||||
@@ -120,11 +127,7 @@ require("nvim-ts-autotag").setup({
|
||||
})
|
||||
|
||||
--''''''''''''''''''''''''rainbow'''''''''''''''''''''''''''''''''''''''
|
||||
require("rainbow-delimiters.setup").setup({
|
||||
strategy = {},
|
||||
query = {},
|
||||
highlight = {},
|
||||
})
|
||||
require("rainbow-delimiters.setup").setup()
|
||||
|
||||
--''''''''''Lualine''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
require("lualine").setup({
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "a4bef5b4fc1f064f2f673172252028eae18191c9" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "337ecfadb8bf005050990bf2f624dc4fc828dabd" },
|
||||
"buffer-vacuum": { "branch": "main", "commit": "917986d31cce6501c929ab6088c0887beff56b69" },
|
||||
"catppuccin": { "branch": "main", "commit": "0303a7208dba448c459767486a38a6ec05c4216b" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
@@ -8,29 +8,29 @@
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"go-tagger.nvim": { "branch": "master", "commit": "8fb11cdda459d2336c6312d9dfb2108f250b95e2" },
|
||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"local-highlight.nvim": { "branch": "master", "commit": "dd8ae2ca26a5cfa17fb598864eacbe2df63938f3" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "b7ace9ddb1640ce266012a45a672dfdaedfa5ec6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
|
||||
"mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "906c32c8a034dd3d51353d63226bf91aeacd927c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "167f29529ff1438e673b1792a71aaf79ddd6c74f" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "f9d557ac7cd28a3a993b5ea49716498bd540b01f" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "27681d797a26f1b4d6119296df42f5204c88a2dc" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "01f8e62ea11603e59ad9ff7afcfa94fd183f76d6" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "664c0b7cea1de71f8b65dfe951b7996fc3e6ccde" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ed19590a3a9792901553c388d1aadafce012f80d" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "b91ee5a77a6a9605d9c1aaf4fda74b66082c8297" },
|
||||
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "a798325b7f36acc62741d1029930a7b96d4dd4bf" },
|
||||
"ruffer": { "branch": "plugin", "commit": "5248604605bf1039147f3f29dcd46aa296557e9c" },
|
||||
|
||||
@@ -2,78 +2,67 @@
|
||||
|
||||
-- Helper to easily set autocmds in Lua
|
||||
local function buf_map(mode, lhs, rhs, opts)
|
||||
opts = vim.tbl_extend('force', { noremap = true, silent = true, buffer = true }, opts or {})
|
||||
opts = vim.tbl_extend("force", { noremap = true, silent = true, buffer = true }, opts or {})
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
-- Create all autocmds
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'python',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "python",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!python3 %<CR>')
|
||||
buf_map('i', '<F10>', '<Esc>:w<CR>:!python3 %<CR>')
|
||||
buf_map('n', '<F11>', ':w<CR>:FloatermNew --disposable --autoclose=0 python3 %<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!python3 %<CR>")
|
||||
buf_map("i", "<F10>", "<Esc>:w<CR>:!python3 %<CR>")
|
||||
buf_map("n", "<F11>", ":w<CR>:FloatermNew --disposable --autoclose=0 python3 %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'javascript',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "sh",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!node %<CR>')
|
||||
buf_map('i', '<F10>', '<Esc>:w<CR>:!node %<CR>')
|
||||
buf_map('n', '<F11>', ':w<CR>:FloatermNew --disposable --autoclose=0 node %<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!/bin/bash %<CR>")
|
||||
buf_map("i", "<F10>", "<Esc>:w<CR>:!/bin/bash %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'sh',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "cpp",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!/bin/bash %<CR>')
|
||||
buf_map('i', '<F10>', '<Esc>:w<CR>:!/bin/bash %<CR>')
|
||||
buf_map("n", "<F10>", ":!g++ -o %:p:r %<CR>:!%:p:r<CR>")
|
||||
buf_map("n", "<F9>", ":w<bar>:FloatermNew --autoclose=0 g++ -g -Wall % && ./a.out<CR>")
|
||||
buf_map("n", "<F11>", ":w<bar>:FloatermNew --disposable --autoclose=0 g++ -o %:p:r %<bar>/%:p:r<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'cpp',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "lua",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':!g++ -o %:p:r %<CR>:!%:p:r<CR>')
|
||||
buf_map('n', '<F9>', ':w<bar>:FloatermNew --autoclose=0 g++ -g -Wall % && ./a.out<CR>')
|
||||
buf_map('n', '<F11>', ':w<bar>:FloatermNew --disposable --autoclose=0 g++ -o %:p:r %<bar>/%:p:r<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!lua %<CR>")
|
||||
buf_map("n", "<F11>", ":w<bar>:FloatermNew --disposable --autoclose=0 lua %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'lua',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "typescript",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!lua %<CR>')
|
||||
buf_map('n', '<F11>', ':w<bar>:FloatermNew --disposable --autoclose=0 lua %<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!npx tsx %<CR>")
|
||||
buf_map("n", "<F11>", ":w<CR>:FloatermNew --disposable --autoclose=0 npx tsx %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'typescript',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "go",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!npx tsx %<CR>')
|
||||
buf_map('n', '<F11>', ':w<CR>:FloatermNew --disposable --autoclose=0 npx tsx %<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!go run %<CR>")
|
||||
buf_map("i", "<F10>", "<Esc>:w<CR>:!go run %<CR>")
|
||||
buf_map("n", "<F11>", ":w<CR>:FloatermNew --disposable --autoclose=0 go run %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'r',
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "zig",
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!Rscript %<CR>')
|
||||
buf_map('i', '<F10>', '<Esc>:w<CR>:!Rscript %<CR>')
|
||||
buf_map('n', '<F11>', ':w<CR>:FloatermNew --disposable --autoclose=0 Rscript %<CR>')
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'go',
|
||||
callback = function()
|
||||
buf_map('n', '<F10>', ':w<CR>:!go run %<CR>')
|
||||
buf_map('i', '<F10>', '<Esc>:w<CR>:!go run %<CR>')
|
||||
buf_map('n', '<F11>', ':w<CR>:FloatermNew --disposable --autoclose=0 go run %<CR>')
|
||||
buf_map("n", "<F10>", ":w<CR>:!zig run %<CR>")
|
||||
buf_map("i", "<F10>", "<Esc>:w<CR>:!zig run %<CR>")
|
||||
buf_map("n", "<F11>", ":w<CR>:FloatermNew --disposable --autoclose=0 zig run %<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -82,8 +82,8 @@ end
|
||||
ls.add_snippets("go", {
|
||||
s("iferr", {
|
||||
t("if err != nil {"),
|
||||
t({ "", "\treturn " }),
|
||||
i(1, "err"),
|
||||
t({ "", "\tlog.Fatal(" }),
|
||||
i(1, "err)"),
|
||||
t({ "", "}" }),
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -46,6 +46,12 @@ local lsp_attach = function(client, bufnr)
|
||||
bufmap("n", "<F1>", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }))
|
||||
end, "Toggle inlay hints")
|
||||
|
||||
-- Turn inlay hints on automatically, but only for these filetypes
|
||||
local inlay_hint_filetypes = { go = true, cpp = true }
|
||||
if client:supports_method("textDocument/inlayHint") and inlay_hint_filetypes[vim.bo[bufnr].filetype] then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||
end
|
||||
end
|
||||
|
||||
-- Mason-LSPconfig setup
|
||||
@@ -58,8 +64,8 @@ local servers = {
|
||||
"html",
|
||||
"stimulus_ls",
|
||||
"cssls",
|
||||
"gopls",
|
||||
"yamlls",
|
||||
"zls",
|
||||
}
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
@@ -75,6 +81,28 @@ for _, server in ipairs(servers) do
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
|
||||
-- GOPLS
|
||||
vim.lsp.config("gopls", {
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp_attach,
|
||||
settings = {
|
||||
gopls = {
|
||||
hints = {
|
||||
parameterNames = true,
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true, -- {/* in: */ "hello", /* want: */ "world"}
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable("gopls")
|
||||
|
||||
--- pyright
|
||||
vim.lsp.config("pyright", {
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp_attach,
|
||||
|
||||
@@ -96,8 +96,6 @@ local plugins = {
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
},
|
||||
-- LuaSnip snippets
|
||||
{ "rafamadriz/friendly-snippets" },
|
||||
|
||||
-- Autopairs
|
||||
{
|
||||
@@ -135,7 +133,7 @@ local plugins = {
|
||||
},
|
||||
|
||||
-- Rainbow delimiters
|
||||
{ "HiPhish/rainbow-delimiters.nvim", event = "BufReadPost" },
|
||||
{ "HiPhish/rainbow-delimiters.nvim" },
|
||||
|
||||
-- Completion engine
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
@@ -229,6 +227,24 @@ local plugins = {
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- lazy.nvim
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
bind = true,
|
||||
handler_opts = { border = "rounded" },
|
||||
doc_lines = 0, -- show only the signature, no documentation
|
||||
hint_enable = false,
|
||||
hint_prefix = "🐾 ",
|
||||
floating_window = true,
|
||||
auto_close_after = nil,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("lsp_signature").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
local opts = {}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/home/mahalo/.config/systemd/user/polkit-kde-authentication-agent.service
|
||||
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Polkit KDE Authentication Agent
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/libexec/kf6/polkit-kde-authentication-agent-1
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
@@ -40,6 +40,7 @@ x-scheme-handler/claude-cli=claude-code-url-handler.desktop
|
||||
text/javascript=org.gnome.TextEditor.desktop
|
||||
text/css=org.gnome.TextEditor.desktop
|
||||
x-scheme-handler/jetbrains=jetbrainsd.desktop
|
||||
audio/x-mod=org.gnome.TextEditor.desktop
|
||||
|
||||
[Added Associations]
|
||||
x-scheme-handler/terminal=org.wezfurlong.wezterm.desktop;
|
||||
@@ -70,3 +71,4 @@ text/x-c++src=org.gnome.TextEditor.desktop;
|
||||
application/x-bat=org.gnome.TextEditor.desktop;
|
||||
text/javascript=org.gnome.TextEditor.desktop;
|
||||
text/css=org.gnome.TextEditor.desktop;
|
||||
audio/x-mod=org.gnome.TextEditor.desktop;
|
||||
|
||||
Reference in New Issue
Block a user