Compare commits
14 Commits
608d9b8cf7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c052509c4 | |||
| 03a9ca5060 | |||
| 9f17fbcb37 | |||
| c42475c571 | |||
| 0d1702456e | |||
| 2914b79ded | |||
| 1c8d5284ca | |||
| 640379c105 | |||
| 379ae0f786 | |||
| fe08de4f9a | |||
| 2d0f0470a0 | |||
| 99ab844325 | |||
| 927f556aef | |||
| f0e19a1f71 |
+18
-4
@@ -1,4 +1,4 @@
|
|||||||
#? Config file for btop v.1.4.6
|
#? Config file for btop v.1.4.7
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
@@ -14,6 +14,11 @@ truecolor = true
|
|||||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||||
force_tty = false
|
force_tty = false
|
||||||
|
|
||||||
|
#* Option to disable presets. Either the default preset, custom presets, or all presets.
|
||||||
|
#* "Off" All presets are enabled.
|
||||||
|
#* "Default" preset is disabled.#* "Custom" presets are disabled.#* "All" presets are disabled.
|
||||||
|
disable_presets = "Off"
|
||||||
|
|
||||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||||
#* Use whitespace " " as separator between different presets.
|
#* Use whitespace " " as separator between different presets.
|
||||||
@@ -24,6 +29,9 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
|
|||||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||||
vim_keys = false
|
vim_keys = false
|
||||||
|
|
||||||
|
#* Disable all mouse events.
|
||||||
|
disable_mouse = false
|
||||||
|
|
||||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||||
rounded_corners = true
|
rounded_corners = true
|
||||||
|
|
||||||
@@ -53,14 +61,14 @@ graph_symbol_net = "default"
|
|||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
shown_boxes = "cpu mem net proc gpu0"
|
shown_boxes = "gpu0 cpu mem net proc"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
update_ms = 2000
|
update_ms = 2000
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "cpu lazy"
|
proc_sorting = "memory"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = false
|
proc_reversed = false
|
||||||
@@ -92,6 +100,9 @@ proc_left = false
|
|||||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||||
proc_filter_kernel = false
|
proc_filter_kernel = false
|
||||||
|
|
||||||
|
#* Should the process list follow the selected process when detailed view is open.
|
||||||
|
proc_follow_detailed = true
|
||||||
|
|
||||||
#* In tree-view, always accumulate child process resources in the parent process.
|
#* In tree-view, always accumulate child process resources in the parent process.
|
||||||
proc_aggregate = false
|
proc_aggregate = false
|
||||||
|
|
||||||
@@ -208,6 +219,9 @@ io_graph_combined = false
|
|||||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||||
io_graph_speeds = ""
|
io_graph_speeds = ""
|
||||||
|
|
||||||
|
#* Swap the positions of the upload and download speed graphs. When true, upload will be on top.
|
||||||
|
swap_upload_download = false
|
||||||
|
|
||||||
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
||||||
net_download = 100
|
net_download = 100
|
||||||
|
|
||||||
@@ -250,7 +264,7 @@ rsmi_measure_pcie_speeds = true
|
|||||||
#* Horizontally mirror the GPU graph.
|
#* Horizontally mirror the GPU graph.
|
||||||
gpu_mirror_graph = true
|
gpu_mirror_graph = true
|
||||||
|
|
||||||
#* Set which GPU vendors to show. Available values are "nvidia amd intel"
|
#* Set which GPU vendors to show. Available values are "nvidia amd intel apple"
|
||||||
shown_gpus = "nvidia amd intel"
|
shown_gpus = "nvidia amd intel"
|
||||||
|
|
||||||
#* Custom gpu0 model name, empty string to disable.
|
#* Custom gpu0 model name, empty string to disable.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ application/x-bittorrent=org.qbittorrent.qBittorrent.desktop;
|
|||||||
inode/directory=yazi.desktop;
|
inode/directory=yazi.desktop;
|
||||||
x-scheme-handler/msteams=teams.desktop;
|
x-scheme-handler/msteams=teams.desktop;
|
||||||
text/calendar=userapp-khalimport.desktop;
|
text/calendar=userapp-khalimport.desktop;
|
||||||
x-scheme-handler/discord=vesktop.desktop;
|
x-scheme-handler/discord=discord.desktop
|
||||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=org.kde.okular.desktop;
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document=org.kde.okular.desktop;
|
||||||
text/markdown=org.kde.okular.desktop;
|
text/markdown=org.kde.okular.desktop;
|
||||||
application/zip=userapp-file-roller.desktop;
|
application/zip=userapp-file-roller.desktop;
|
||||||
@@ -38,6 +38,7 @@ x-scheme-handler/vnc=org.remmina.Remmina.desktop;
|
|||||||
x-scheme-handler/remmina=org.remmina.Remmina.desktop;
|
x-scheme-handler/remmina=org.remmina.Remmina.desktop;
|
||||||
application/x-remmina=org.remmina.Remmina.desktop;
|
application/x-remmina=org.remmina.Remmina.desktop;
|
||||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
|
||||||
|
image/heif=qimgv.desktop
|
||||||
|
|
||||||
[Added Associations]
|
[Added Associations]
|
||||||
|
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ vim.o.colorcolumn = "100"
|
|||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
|
vim.g.no_python_maps = 1
|
||||||
|
|||||||
+77
-100
@@ -7,7 +7,6 @@ vim.opt.shell = "/usr/bin/zsh"
|
|||||||
vim.g.BASH_Ctrl_j = "off"
|
vim.g.BASH_Ctrl_j = "off"
|
||||||
vim.g.BASH_Ctrl_l = "off"
|
vim.g.BASH_Ctrl_l = "off"
|
||||||
vim.opt.clipboard:append("unnamedplus")
|
vim.opt.clipboard:append("unnamedplus")
|
||||||
vim.opt.guicursor = "n-v-c:block-CustomCursor,i:ver100-CustomICursor,n-v-c:blinkon0,i:blinkwait10"
|
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.listchars = { tab = "→ ", trail = "·", extends = "↷", precedes = "↶", nbsp = "+" }
|
vim.opt.listchars = { tab = "→ ", trail = "·", extends = "↷", precedes = "↶", nbsp = "+" }
|
||||||
@@ -43,7 +42,7 @@ vim.opt.smartindent = false
|
|||||||
vim.opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
|
vim.opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
|
||||||
|
|
||||||
-- Completion Window/Popup settings
|
-- Completion Window/Popup settings
|
||||||
vim.opt.completeopt = { "menu", "popup", "preview" }
|
vim.opt.completeopt = { "menu", "menuone", "longest", "noselect", "noinsert", "popup", "preview" }
|
||||||
vim.opt.pumblend = 10
|
vim.opt.pumblend = 10
|
||||||
vim.opt.pumheight = 10
|
vim.opt.pumheight = 10
|
||||||
vim.opt.winminwidth = 5
|
vim.opt.winminwidth = 5
|
||||||
@@ -77,7 +76,6 @@ vim.opt.splitkeep = "screen"
|
|||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
|
|
||||||
-- Terminal & Status Column
|
-- Terminal & Status Column
|
||||||
vim.opt.termguicolors = true
|
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
@@ -99,7 +97,7 @@ vim.diagnostic.config({
|
|||||||
float = { source = true },
|
float = { source = true },
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
desc = "Disable auto-commenting on new line",
|
desc = "Disable auto-commenting on new line",
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function() vim.opt_local.formatoptions:remove({ "r", "o" }) end,
|
callback = function() vim.opt_local.formatoptions:remove({ "r", "o" }) end,
|
||||||
@@ -230,36 +228,6 @@ map("n", "]e", diagnostic_goto(1, "ERROR"), { desc = "Next Error" })
|
|||||||
map("n", "]w", diagnostic_goto(1, "WARN"), { desc = "Next Warning" })
|
map("n", "]w", diagnostic_goto(1, "WARN"), { desc = "Next Warning" })
|
||||||
map("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics to Location List" })
|
map("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics to Location List" })
|
||||||
|
|
||||||
-- Buffer-local LSP mappings
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
|
||||||
callback = function(ev)
|
|
||||||
local bmap = function(mode, keys, func, desc) vim.keymap.set(mode, keys, func, { buffer = ev.buf, desc = desc }) end
|
|
||||||
|
|
||||||
bmap("n", "gd", vim.lsp.buf.definition, "Goto Definition")
|
|
||||||
bmap("n", "gD", vim.lsp.buf.type_definition, "Goto Type Definition")
|
|
||||||
bmap("n", "gi", vim.lsp.buf.declaration, "Goto Declaration")
|
|
||||||
bmap("n", "gI", vim.lsp.buf.implementation, "Goto Implementation")
|
|
||||||
bmap("n", "gr", function() vim.lsp.buf.references({ includeDeclaration = false }) end, "Goto References")
|
|
||||||
|
|
||||||
bmap({ "n", "i" }, "<M-x>", vim.lsp.buf.signature_help, "Signature Help")
|
|
||||||
bmap("n", "<M-r>", vim.lsp.buf.rename, "Rename Symbol")
|
|
||||||
bmap({ "n", "x" }, "<leader>ca", vim.lsp.buf.code_action, "Code Action")
|
|
||||||
|
|
||||||
-- K is automatically mapped to vim.lsp.buf.hover() in Neovim 0.10+
|
|
||||||
-- If your LSP supports inlay hints, you can add a toggle here:
|
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
|
||||||
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
|
||||||
bmap(
|
|
||||||
"n",
|
|
||||||
"<leader>uh",
|
|
||||||
function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end,
|
|
||||||
"Toggle Inlay Hints"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- ----------------------------------------
|
-- ----------------------------------------
|
||||||
-- AUTOCMD
|
-- AUTOCMD
|
||||||
-- ----------------------------------------
|
-- ----------------------------------------
|
||||||
@@ -337,7 +305,6 @@ end, { nargs = 1 })
|
|||||||
local function makespecs_themes()
|
local function makespecs_themes()
|
||||||
return {
|
return {
|
||||||
"junegunn/seoul256.vim",
|
"junegunn/seoul256.vim",
|
||||||
"mcauley-penney/phobos-anomaly.nvim",
|
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
{
|
{
|
||||||
"uloco/bluloco.nvim",
|
"uloco/bluloco.nvim",
|
||||||
@@ -354,26 +321,14 @@ local function makespecs_themes()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function makespec_lspconfig()
|
local function makespec_lspconfig()
|
||||||
local rootdirfix = function(root_markers)
|
|
||||||
return function(bufnr, on_dir)
|
|
||||||
on_dir(require("lspconfig").util.root_pattern(unpack(root_markers))(vim.fn.bufname(bufnr)))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
lazy = false,
|
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
cmd = { "LspInfo", "LspRestart", "LspStart", "LspStop" },
|
|
||||||
keys = { { "<F4>", "<cmd>LspInfo<cr>", noremap = true } },
|
|
||||||
config = function()
|
config = function()
|
||||||
|
-- Lua
|
||||||
vim.lsp.config("lua_ls", {
|
vim.lsp.config("lua_ls", {
|
||||||
cmd = { "lua-language-server" },
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME } },
|
||||||
checkThirdParty = false,
|
|
||||||
library = { vim.env.VIMRUNTIME },
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
diagnostics = { globals = { "vim" } },
|
diagnostics = { globals = { "vim" } },
|
||||||
format = { enable = false },
|
format = { enable = false },
|
||||||
@@ -409,7 +364,7 @@ local function makespec_lspconfig()
|
|||||||
vim.lsp.config("yamlls", {
|
vim.lsp.config("yamlls", {
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
schemas = { kubernetes = "/home/hjalmarlucius/src/hjarl/system/manifests/*.yaml" },
|
schemas = { kubernetes = vim.fn.expand("~/src/hjarl/system/manifests/*.yaml") },
|
||||||
-- schemaStore = { enable = false, url = "" },
|
-- schemaStore = { enable = false, url = "" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -417,24 +372,21 @@ local function makespec_lspconfig()
|
|||||||
vim.lsp.config("ty", {
|
vim.lsp.config("ty", {
|
||||||
cmd = { "ty", "server" },
|
cmd = { "ty", "server" },
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
root_dir = rootdirfix({ ".git", "pyproject.toml", "setup.py", "setup.cfg" }),
|
root_markers = { ".git" },
|
||||||
settings = { ty = { experimental = { rename = true } } },
|
settings = { ty = { completions = { autoImport = false }, experimental = { rename = true } } },
|
||||||
})
|
})
|
||||||
vim.lsp.config("pyrefly", {
|
vim.lsp.config("pyrefly", {
|
||||||
cmd = { "pyrefly", "lsp" },
|
cmd = { "pyrefly", "lsp" },
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
root_dir = rootdirfix({ ".git", "pyproject.toml", "setup.py", "setup.cfg", "pyrefly.toml" }),
|
root_markers = { ".git" },
|
||||||
})
|
})
|
||||||
vim.lsp.config("pylsp", {
|
vim.lsp.config("pylsp", {
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
root_dir = rootdirfix({ ".git", "pyproject.toml", "setup.py", "setup.cfg" }),
|
root_markers = { ".git" },
|
||||||
settings = {
|
settings = {
|
||||||
pylsp = {
|
pylsp = {
|
||||||
plugins = {
|
plugins = {
|
||||||
pylsp_mypy = {
|
pylsp_mypy = { enabled = true, dmypy = true },
|
||||||
enabled = true,
|
|
||||||
dmypy = true,
|
|
||||||
},
|
|
||||||
pycodestyle = { enabled = false },
|
pycodestyle = { enabled = false },
|
||||||
mccabe = { enabled = false },
|
mccabe = { enabled = false },
|
||||||
},
|
},
|
||||||
@@ -444,11 +396,10 @@ local function makespec_lspconfig()
|
|||||||
vim.lsp.config("basedpyright", {
|
vim.lsp.config("basedpyright", {
|
||||||
cmd = { "basedpyright-langserver", "--stdio", "--threads", "20" },
|
cmd = { "basedpyright-langserver", "--stdio", "--threads", "20" },
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
root_dir = rootdirfix({ ".git", "pyproject.toml", "setup.py", "setup.cfg", "pyrightconfig.json" }),
|
root_markers = { ".git" },
|
||||||
settings = {
|
settings = {
|
||||||
python = {
|
python = {
|
||||||
analysis = {
|
analysis = {
|
||||||
-- logLevel = "Trace",
|
|
||||||
autoImportCompletions = false,
|
autoImportCompletions = false,
|
||||||
diagnosticMode = "workspace",
|
diagnosticMode = "workspace",
|
||||||
logTypeEvaluationTime = true,
|
logTypeEvaluationTime = true,
|
||||||
@@ -465,16 +416,12 @@ local function makespec_lspconfig()
|
|||||||
autoUseWorkspaceTsdk = true,
|
autoUseWorkspaceTsdk = true,
|
||||||
experimental = {
|
experimental = {
|
||||||
maxInlayHintLength = 30,
|
maxInlayHintLength = 30,
|
||||||
completion = {
|
completion = { enableServerSideFuzzyMatch = true },
|
||||||
enableServerSideFuzzyMatch = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
javascript = {
|
javascript = {
|
||||||
updateImportsOnFileMove = { enabled = "always" },
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
suggest = {
|
suggest = { completeFunctionCalls = true },
|
||||||
completeFunctionCalls = true,
|
|
||||||
},
|
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
enumMemberValues = { enabled = true },
|
enumMemberValues = { enabled = true },
|
||||||
functionLikeReturnTypes = { enabled = true },
|
functionLikeReturnTypes = { enabled = true },
|
||||||
@@ -486,9 +433,7 @@ local function makespec_lspconfig()
|
|||||||
},
|
},
|
||||||
typescript = {
|
typescript = {
|
||||||
updateImportsOnFileMove = { enabled = "always" },
|
updateImportsOnFileMove = { enabled = "always" },
|
||||||
suggest = {
|
suggest = { completeFunctionCalls = true },
|
||||||
completeFunctionCalls = true,
|
|
||||||
},
|
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
enumMemberValues = { enabled = true },
|
enumMemberValues = { enabled = true },
|
||||||
functionLikeReturnTypes = { enabled = true },
|
functionLikeReturnTypes = { enabled = true },
|
||||||
@@ -501,6 +446,18 @@ local function makespec_lspconfig()
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("tinymist", {
|
||||||
|
cmd = { "tinymist" },
|
||||||
|
filetypes = { "typst" },
|
||||||
|
root_markers = { ".git", "typst.toml" },
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("bashls", {
|
||||||
|
cmd = { "bash-language-server", "start" },
|
||||||
|
filetypes = { "sh", "bash" },
|
||||||
|
root_markers = { ".git" },
|
||||||
|
})
|
||||||
|
|
||||||
vim.lsp.enable("bashls")
|
vim.lsp.enable("bashls")
|
||||||
vim.lsp.enable("clangd")
|
vim.lsp.enable("clangd")
|
||||||
vim.lsp.enable("html")
|
vim.lsp.enable("html")
|
||||||
@@ -512,6 +469,42 @@ local function makespec_lspconfig()
|
|||||||
vim.lsp.enable("tinymist")
|
vim.lsp.enable("tinymist")
|
||||||
vim.lsp.enable("vtsls")
|
vim.lsp.enable("vtsls")
|
||||||
vim.lsp.enable("yamlls")
|
vim.lsp.enable("yamlls")
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = vim.api.nvim_create_augroup("DefeatFtpluginOmnifunc", { clear = true }),
|
||||||
|
pattern = { "python" },
|
||||||
|
callback = function(ev)
|
||||||
|
vim.schedule(function()
|
||||||
|
if vim.api.nvim_buf_is_valid(ev.buf) then vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = vim.api.nvim_create_augroup("UserLspConfig", { clear = true }),
|
||||||
|
callback = function(ev)
|
||||||
|
local bmap = function(mode, keys, func, desc)
|
||||||
|
vim.keymap.set(mode, keys, func, { buffer = ev.buf, desc = desc, silent = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
bmap("n", "gd", vim.lsp.buf.definition, "Goto Definition")
|
||||||
|
bmap("n", "gD", vim.lsp.buf.declaration, "Goto Declaration")
|
||||||
|
bmap("n", "gy", vim.lsp.buf.type_definition, "Goto Type Definition")
|
||||||
|
bmap({ "n", "i" }, "<M-x>", vim.lsp.buf.signature_help, "Signature Help")
|
||||||
|
bmap("i", "<C-Space>", "<C-x><C-o>", "Trigger LSP Completion")
|
||||||
|
bmap("i", "<C-l>", "<C-n>", "Buffer/Keyword Completion")
|
||||||
|
bmap("i", "<C-f>", "<C-x><C-f>", "File Path Completion")
|
||||||
|
|
||||||
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
|
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||||
|
bmap(
|
||||||
|
"n",
|
||||||
|
"<leader>uh",
|
||||||
|
function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end,
|
||||||
|
"Toggle Inlay Hints"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@@ -743,16 +736,9 @@ local function makespecs_previewers()
|
|||||||
get_root = function(filename)
|
get_root = function(filename)
|
||||||
local root = os.getenv("TYPST_ROOT")
|
local root = os.getenv("TYPST_ROOT")
|
||||||
if root then return root end
|
if root then return root end
|
||||||
local dir0 = vim.fn.fnamemodify(filename, ":p:h")
|
local git_root = vim.fs.root(filename, ".git")
|
||||||
local dir = dir0
|
if git_root then return git_root end
|
||||||
for _ = 1, 10 do
|
return vim.fn.fnamemodify(filename, ":p:h")
|
||||||
if vim.fn.isdirectory(dir .. "/.git/") ~= 0 or vim.fn.filereadable(dir .. "/.git") ~= 0 then
|
|
||||||
print("root dir: " .. dir)
|
|
||||||
return dir
|
|
||||||
end
|
|
||||||
dir = vim.fn.fnamemodify(dir, ":p:h:h")
|
|
||||||
end
|
|
||||||
return dir0
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -958,7 +944,6 @@ local function makespec_whichkey()
|
|||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
defaults = {},
|
|
||||||
spec = {
|
spec = {
|
||||||
{
|
{
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
@@ -975,6 +960,12 @@ local function makespec_whichkey()
|
|||||||
{ "[", group = "prev" },
|
{ "[", group = "prev" },
|
||||||
{ "]", group = "next" },
|
{ "]", group = "next" },
|
||||||
{ "g", group = "goto" },
|
{ "g", group = "goto" },
|
||||||
|
{ "gr", group = "lsp actions", icon = { icon = " ", color = "purple" } },
|
||||||
|
{ "gra", desc = "Code Action" },
|
||||||
|
{ "gri", desc = "Goto Implementation" },
|
||||||
|
{ "grn", desc = "Rename Symbol" },
|
||||||
|
{ "grr", desc = "Goto References" },
|
||||||
|
{ "gy", desc = "Goto Type Definition" },
|
||||||
{ "gs", group = "surround" },
|
{ "gs", group = "surround" },
|
||||||
{ "z", group = "fold" },
|
{ "z", group = "fold" },
|
||||||
{ "<leader><tab>", group = "tabs" },
|
{ "<leader><tab>", group = "tabs" },
|
||||||
@@ -992,7 +983,7 @@ local function makespec_whichkey()
|
|||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>?",
|
"<leader>?",
|
||||||
function() require("which-key").show({ global = false }) end,
|
function() require("which-key").show({ global = true }) end,
|
||||||
desc = "Buffer Keymaps (which-key)",
|
desc = "Buffer Keymaps (which-key)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1075,8 +1066,8 @@ local function makespec_snacks()
|
|||||||
{ "<M-f>", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
{ "<M-f>", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
||||||
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
||||||
{ "<leader>fa", function() Snacks.picker.files() end, desc = "Find Files" },
|
{ "<leader>fa", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||||
{ "<leader>fc", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/dotfiles", title="Find Configs" }) end, desc = "Find Config" },
|
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.expand("~/dotfiles"), title="Find Configs" }) end, desc = "Find Config" },
|
||||||
{ "<leader>fn", function() Snacks.picker.files({ cwd = "/home/hjalmarlucius/notes", title="Find Notes" }) end, desc = "Find Note", },
|
{ "<leader>fn", function() Snacks.picker.files({ cwd = vim.fn.expand("~/notes"), title="Find Notes" }) end, desc = "Find Note", },
|
||||||
-- logs
|
-- logs
|
||||||
{ "<leader>ll", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
{ "<leader>ll", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||||
-- code
|
-- code
|
||||||
@@ -1454,24 +1445,9 @@ local function makespec_lint()
|
|||||||
}
|
}
|
||||||
|
|
||||||
local lint_augroup = vim.api.nvim_create_augroup("nvim_lint", { clear = true })
|
local lint_augroup = vim.api.nvim_create_augroup("nvim_lint", { clear = true })
|
||||||
local timer = vim.uv.new_timer()
|
|
||||||
|
|
||||||
-- Use a timer to debounce linting to prevent UI stutter
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||||
group = lint_augroup,
|
group = lint_augroup,
|
||||||
callback = function(args)
|
callback = function() require("lint").try_lint() end,
|
||||||
timer:stop()
|
|
||||||
local bufnr = args.buf
|
|
||||||
timer:start(
|
|
||||||
200,
|
|
||||||
0,
|
|
||||||
vim.schedule_wrap(function()
|
|
||||||
if vim.api.nvim_buf_is_valid(bufnr) then
|
|
||||||
require("lint").try_lint(nil, { bufnr = bufnr })
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -1713,5 +1689,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = lazyspecs,
|
spec = lazyspecs,
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
|
rocks = { enabled = false },
|
||||||
})
|
})
|
||||||
vim.cmd("colorscheme catppuccin-nvim")
|
vim.cmd("colorscheme sonokai")
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Any
|
from qutebrowser.config.config import ConfigContainer
|
||||||
|
from qutebrowser.config.configfiles import ConfigAPI
|
||||||
|
|
||||||
config: Any = None
|
c: "ConfigContainer" = c # type: ignore # noqa: F821
|
||||||
c: Any = None
|
config: "ConfigAPI" = config # type: ignore # noqa: F821
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
config.load_autoconfig(True)
|
config.load_autoconfig(True)
|
||||||
config.bind("<", "tab-move -")
|
config.bind("<", "tab-move -")
|
||||||
config.bind("<Ctrl+Shift+Tab>", "tab-prev")
|
config.bind("<Ctrl+Shift+Tab>", "tab-prev")
|
||||||
config.bind("<Ctrl+Tab>", "tab-next")
|
config.bind("<Ctrl+Tab>", "tab-next")
|
||||||
config.bind("<Ctrl+l>", "cmd-set-text :open {url:pretty}")
|
config.bind("<Ctrl+l>", "cmd-set-text :open {url:pretty}")
|
||||||
config.bind("<Ctrl+r>", "reload")
|
config.unbind("r", mode="normal")
|
||||||
|
config.bind("<Ctrl+r>", "reload -f")
|
||||||
|
config.bind("R", "reload", mode="normal")
|
||||||
config.bind("<Ctrl+n>", "tab-clone -w")
|
config.bind("<Ctrl+n>", "tab-clone -w")
|
||||||
config.bind("<Ctrl+t>", "tab-clone -t")
|
config.bind("<Ctrl+t>", "tab-clone -t")
|
||||||
config.bind("<Ctrl+Shift+r>", "restart", mode="normal")
|
config.bind("<Ctrl+Shift+r>", "restart", mode="normal")
|
||||||
@@ -46,8 +50,8 @@ config.bind("wk", "forward -w", mode="normal")
|
|||||||
config.bind("ø", "cmd-set-text :")
|
config.bind("ø", "cmd-set-text :")
|
||||||
config.bind("m", 'cmd-set-text :quickmark-add {url:pretty} "', mode="normal")
|
config.bind("m", 'cmd-set-text :quickmark-add {url:pretty} "', mode="normal")
|
||||||
config.bind("D", "tab-close")
|
config.bind("D", "tab-close")
|
||||||
config.bind(",m", "hint links spawn mpv {hint-url}", mode="normal")
|
config.bind(",m", "hint links spawn -d mpv {hint-url}", mode="normal")
|
||||||
config.bind(",M", "spawn mpv {url}", mode="normal")
|
config.bind(",M", "spawn -d mpv {url}", mode="normal")
|
||||||
config.unbind("co") # close all tabs except this one
|
config.unbind("co") # close all tabs except this one
|
||||||
config.unbind("<Ctrl+x>") # navigate decrement
|
config.unbind("<Ctrl+x>") # navigate decrement
|
||||||
config.unbind("<Ctrl+a>") # navigate increment
|
config.unbind("<Ctrl+a>") # navigate increment
|
||||||
@@ -69,7 +73,7 @@ c.completion.open_categories = [
|
|||||||
c.content.register_protocol_handler = False
|
c.content.register_protocol_handler = False
|
||||||
c.content.blocking.enabled = True
|
c.content.blocking.enabled = True
|
||||||
c.content.fullscreen.window = True
|
c.content.fullscreen.window = True
|
||||||
c.content.blocking.method = "both"
|
c.content.blocking.method = "adblock"
|
||||||
c.content.blocking.adblock.lists = [
|
c.content.blocking.adblock.lists = [
|
||||||
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
|
||||||
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
|
"https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
|
||||||
@@ -107,6 +111,14 @@ urlconfigs: dict[str, list[tuple[str, bool | str | dict[str, str]]]] = {
|
|||||||
{"X-YouTube-Client-Name": "85", "X-YouTube-Client-Version": "2.0"},
|
{"X-YouTube-Client-Name": "85", "X-YouTube-Client-Version": "2.0"},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
"https://*.altinn.no": [
|
||||||
|
("content.cookies.accept", "all"),
|
||||||
|
("content.javascript.can_open_tabs_automatically", True),
|
||||||
|
],
|
||||||
|
"https://*.bankid.no": [
|
||||||
|
("content.cookies.accept", "all"),
|
||||||
|
("content.javascript.can_open_tabs_automatically", True),
|
||||||
|
],
|
||||||
}
|
}
|
||||||
for url, urlconfig in urlconfigs.items():
|
for url, urlconfig in urlconfigs.items():
|
||||||
for setting, value in urlconfig:
|
for setting, value in urlconfig:
|
||||||
@@ -131,7 +143,6 @@ c.input.insert_mode.auto_leave = False
|
|||||||
c.input.insert_mode.plugins = True
|
c.input.insert_mode.plugins = True
|
||||||
c.messages.timeout = 5000
|
c.messages.timeout = 5000
|
||||||
c.qt.force_platform = "wayland"
|
c.qt.force_platform = "wayland"
|
||||||
c.qt.force_software_rendering = "qt-quick"
|
|
||||||
c.qt.highdpi = True
|
c.qt.highdpi = True
|
||||||
c.scrolling.bar = "always"
|
c.scrolling.bar = "always"
|
||||||
c.scrolling.smooth = False
|
c.scrolling.smooth = False
|
||||||
|
|||||||
+1
-1
@@ -67,7 +67,7 @@ set $powermenu ~/.config/sway/scripts/power_menu.sh
|
|||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
# Launch the terminal
|
# Launch the terminal
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
bindsym $mod+Shift+Return exec foot
|
bindsym Mod4+Shift+Return exec foot bash
|
||||||
# Kill focused window
|
# Kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
# Lock screen
|
# Lock screen
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ set -g default-terminal "tmux-256color"
|
|||||||
# Tell tmux which features the outer Foot client supports.
|
# Tell tmux which features the outer Foot client supports.
|
||||||
set -as terminal-features ',foot*:RGB,clipboard,focus,title'
|
set -as terminal-features ',foot*:RGB,clipboard,focus,title'
|
||||||
|
|
||||||
|
# Allow image passthrough
|
||||||
|
set -gq allow-passthrough on
|
||||||
|
|
||||||
# Start with index 1
|
# Start with index 1
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
setw -g pane-base-index 1
|
setw -g pane-base-index 1
|
||||||
@@ -104,6 +107,10 @@ bind t clock-mode
|
|||||||
|
|
||||||
# Show pane numbers
|
# Show pane numbers
|
||||||
bind i display-panes
|
bind i display-panes
|
||||||
|
ps_pid='#(pgrep -P "#{pane_pid}" | tr "\n" " ")'
|
||||||
|
cmd='#(ps --no-headers -o args $(pgrep -P "#{pane_pid}"))'
|
||||||
|
bind P display-message -d 100000 "${cmd} FOLDER:#{pane_current_path} CMD:#{=/-20/…:pane_current_command} PID:${ps_pid}"
|
||||||
|
|
||||||
|
|
||||||
# Config Reloads
|
# Config Reloads
|
||||||
bind r source-file ~/.config/tmux/tmux.conf \; refresh-client \; display-message "Config reloaded"
|
bind r source-file ~/.config/tmux/tmux.conf \; refresh-client \; display-message "Config reloaded"
|
||||||
@@ -119,6 +126,8 @@ bind v split-window -h -c "#{pane_current_path}"
|
|||||||
bind s split-window -v -c "#{pane_current_path}"
|
bind s split-window -v -c "#{pane_current_path}"
|
||||||
bind V split-window -fh -c "#{pane_current_path}"
|
bind V split-window -fh -c "#{pane_current_path}"
|
||||||
bind S split-window -fv -c "#{pane_current_path}"
|
bind S split-window -fv -c "#{pane_current_path}"
|
||||||
|
bind x split-window -fh bash
|
||||||
|
|
||||||
|
|
||||||
# Change layouts
|
# Change layouts
|
||||||
bind o rotate-window
|
bind o rotate-window
|
||||||
|
|||||||
+15
-15
@@ -12,7 +12,7 @@ max_height = 1500
|
|||||||
|
|
||||||
[open]
|
[open]
|
||||||
prepend_rules = [
|
prepend_rules = [
|
||||||
{ name = "*.csv", use = "text" },
|
{ url = "*.csv", use = "text" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[opener]
|
[opener]
|
||||||
@@ -24,36 +24,36 @@ text = [
|
|||||||
[input]
|
[input]
|
||||||
cursor_blink = true
|
cursor_blink = true
|
||||||
|
|
||||||
|
[[plugin.append_previewers]]
|
||||||
|
url = "*"
|
||||||
|
run = "file-extra-metadata"
|
||||||
|
|
||||||
[[plugin.prepend_fetchers]]
|
[[plugin.prepend_fetchers]]
|
||||||
id = "git"
|
group = "git"
|
||||||
name = "*"
|
url = "*"
|
||||||
run = "git"
|
run = "git"
|
||||||
|
|
||||||
[[plugin.prepend_fetchers]]
|
[[plugin.prepend_fetchers]]
|
||||||
id = "git"
|
group = "git"
|
||||||
name = "*/"
|
url = "*/"
|
||||||
run = "git"
|
run = "git"
|
||||||
|
|
||||||
[[plugin.prepend_previewers]]
|
[[plugin.prepend_previewers]]
|
||||||
name = "*.tar*"
|
url = "*.tar*"
|
||||||
run = 'piper --format=url -- tar tf "$1"'
|
run = 'piper --format=url -- tar tf "$1"'
|
||||||
|
|
||||||
[[plugin.prepend_previewers]]
|
[[plugin.prepend_previewers]]
|
||||||
name = "*.csv"
|
url = "*.csv"
|
||||||
run = 'piper -- bat -p --color=always "$1"'
|
run = 'piper -- bat -p --color=always "$1"'
|
||||||
|
|
||||||
[[plugin.prepend_previewers]]
|
[[plugin.prepend_previewers]]
|
||||||
name = "*.md"
|
url = "*.md"
|
||||||
run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
|
run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
|
||||||
|
|
||||||
[[plugin.prepend_previewers]]
|
[[plugin.prepend_previewers]]
|
||||||
name = "*/"
|
url = "*/"
|
||||||
run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"'
|
run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"'
|
||||||
|
|
||||||
[[plugin.append_previewers]]
|
|
||||||
name = "*"
|
|
||||||
run = 'file-extra-metadata'
|
|
||||||
|
|
||||||
[[plugin.prepend_spotters]]
|
[[plugin.prepend_spotters]]
|
||||||
name = "*"
|
url = "*"
|
||||||
run = 'file-extra-metadata'
|
run = "file-extra-metadata"
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ installmap = dict(
|
|||||||
"v4l-utils",
|
"v4l-utils",
|
||||||
# photos
|
# photos
|
||||||
"qimgv",
|
"qimgv",
|
||||||
|
"kimageformats5", # heif support
|
||||||
"digikam",
|
"digikam",
|
||||||
# music
|
# music
|
||||||
"quodlibet",
|
"quodlibet",
|
||||||
@@ -139,7 +140,7 @@ installmap = dict(
|
|||||||
"bandwhich", # network
|
"bandwhich", # network
|
||||||
"sysstat",
|
"sysstat",
|
||||||
),
|
),
|
||||||
apps=("keepassxc", "bitwarden", "qalculate-gtk", "vesktop"),
|
apps=("keepassxc", "bitwarden", "qalculate-gtk", "discord"),
|
||||||
sway=(
|
sway=(
|
||||||
"xdg-terminal-exec",
|
"xdg-terminal-exec",
|
||||||
# visuals
|
# visuals
|
||||||
|
|||||||
Reference in New Issue
Block a user