This commit is contained in:
Greg 2024-11-25 22:12:25 +02:00
parent 0dc4a431c2
commit c15b273db2
4 changed files with 153 additions and 66 deletions

View file

@ -50,14 +50,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 proc" shown_boxes = "mem"
#* 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 = 1000 update_ms = 1000
#* 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 = "threads"
#* Reverse sorting order, True or False. #* Reverse sorting order, True or False.
proc_reversed = False proc_reversed = False

View file

@ -89,9 +89,6 @@ P.S. You can delete this when you're done too. It's your config now! :)
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = " " vim.g.mapleader = " "
vim.g.maplocalleader = " " vim.g.maplocalleader = " "
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour -- optionally enable 24-bit colour
vim.opt.termguicolors = true vim.opt.termguicolors = true
@ -165,6 +162,9 @@ vim.opt.scrolloff = 10
vim.opt.list = false vim.opt.list = false
vim.opt.tabstop = 2 vim.opt.tabstop = 2
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 2
vim.wo.wrap = false
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
@ -172,14 +172,17 @@ vim.opt.shiftwidth = 2
-- See `:help hlsearch` -- See `:help hlsearch`
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>") vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
-- do not run recording -- close buffers with q
vim.keymap.set("n", "q", "<nop>") vim.keymap.set("n", "q", ":bd<cr>")
vim.keymap.set("n", "Q", ":bd<cr>")
-- delete without cut
vim.keymap.set("n", "d", '"_d')
vim.keymap.set("v", "d", '"_d')
-- Ctrl+s to save -- Ctrl+s to save
vim.keymap.set("n", "<C-s>", ":w<CR>") vim.keymap.set("n", "<C-s>", ":w<CR>")
vim.keymap.set("i", "<C-s>", "<ESC>:w<CR>a") vim.keymap.set("i", "<C-s>", "<ESC>:w<CR>a")
-- NvimTree
vim.keymap.set("n", "<C-e>", ":NvimTreeFocus <CR>")
-- ; for command mode -- ; for command mode
vim.keymap.set("n", ";", ":") vim.keymap.set("n", ";", ":")
@ -227,7 +230,9 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
desc = "diagnostics on hold", desc = "diagnostics on hold",
group = vim.api.nvim_create_augroup("diagnostics", { clear = true }), group = vim.api.nvim_create_augroup("diagnostics", { clear = true }),
callback = vim.diagnostic.open_float, callback = function()
vim.diagnostic.open_float(nil, { focus = false })
end,
}) })
-- [[ Install `lazy.nvim` plugin manager ]] -- [[ Install `lazy.nvim` plugin manager ]]
@ -254,19 +259,9 @@ vim.opt.rtp:prepend(lazypath)
-- --
-- NOTE: Here is where you install your plugins. -- NOTE: Here is where you install your plugins.
require("lazy").setup({ require("lazy").setup({
"stevearc/dressing.nvim",
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically "tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
{
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("nvim-tree").setup {}
end,
},
-- NOTE: Plugins can also be added by using a table, -- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following -- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc. -- keys can be used to configure plugin behavior/loading/etc.
@ -288,7 +283,26 @@ require("lazy").setup({
-- Then, because we use the `config` key, the configuration only runs -- Then, because we use the `config` key, the configuration only runs
-- after the plugin has been loaded: -- after the plugin has been loaded:
-- config = function() ... end -- config = function() ... end
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
{ "fredrikaverpil/neotest-golang", version = "*" }, -- Installation
},
config = function()
require("neotest").setup {
adapters = {
require "neotest-golang", -- Registration
},
}
vim.keymap.set("n", "<leader>ts", require("neotest").summary.toggle, { desc = "[T]est [S]ummary" })
vim.keymap.set("n", "<leader>tr", require("neotest").run.run, { desc = "[T]est [R]un" })
end,
},
{ -- Useful plugin to show you pending keybinds. { -- Useful plugin to show you pending keybinds.
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VimEnter", -- Sets the loading event to 'VimEnter' event = "VimEnter", -- Sets the loading event to 'VimEnter'
@ -337,12 +351,86 @@ require("lazy").setup({
{ "<leader>r", group = "[R]ename" }, { "<leader>r", group = "[R]ename" },
{ "<leader>s", group = "[S]earch" }, { "<leader>s", group = "[S]earch" },
{ "<leader>w", group = "[W]orkspace" }, { "<leader>w", group = "[W]orkspace" },
{ "<leader>t", group = "[T]oggle" }, { "<leader>t", group = "[T]est" },
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } }, { "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
}, },
}, },
}, },
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {
jump = {
autojump = true,
},
label = {
before = true,
after = false,
min_pattern_length = 0,
style = "overlay",
-- With `format`, you can change how the label is rendered.
-- Should return a list of `[text, highlight]` tuples.
---@class Flash.Format
---@type fun(opts:Flash.Format): string[][]
-- format = function(opts)
-- return {
-- { opts.match.label1, "FlashMatch" },
-- { opts.match.label2, "FlashLabel" },
-- }
-- end,
},
},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-f>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
-- use opts = {} for passing setup options
-- this is equivalent to setup({}) function
},
-- NOTE: Plugins can specify dependencies. -- NOTE: Plugins can specify dependencies.
-- --
-- The dependencies are proper plugin specifications as well - anything -- The dependencies are proper plugin specifications as well - anything
@ -422,7 +510,7 @@ require("lazy").setup({
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" }) vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" }) vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" }) vim.keymap.set("n", "<leader>ss", builtin.lsp_document_symbols, { desc = "[S]earch [S]ymbols" })
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
@ -547,7 +635,7 @@ require("lazy").setup({
-- Fuzzy find all the symbols in your current document. -- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc. -- Symbols are things like variables, functions, types, etc.
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols") -- map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
-- Fuzzy find all the symbols in your current workspace. -- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project. -- Similar to document symbols, except searches over your entire project.
@ -593,16 +681,6 @@ require("lazy").setup({
end, end,
}) })
end end
-- The following code creates a keymap to toggle inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
end, "[T]oggle Inlay [H]ints")
end
end, end,
}) })
@ -840,7 +918,6 @@ require("lazy").setup({
end, { "i", "s" }), end, { "i", "s" }),
["<C-h>"] = cmp.mapping(function() ["<C-h>"] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end end
end, { "i", "s" }), end, { "i", "s" }),
@ -886,7 +963,16 @@ require("lazy").setup({
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/plenary.nvim" },
opts = { signs = false }, opts = { signs = false },
}, },
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup {
-- Configuration here, or leave empty to use defaults
}
end,
},
{ -- Collection of various small independent plugins/modules { -- Collection of various small independent plugins/modules
"echasnovski/mini.nvim", "echasnovski/mini.nvim",
config = function() config = function()
@ -898,13 +984,6 @@ require("lazy").setup({
-- - ci' - [C]hange [I]nside [']quote -- - ci' - [C]hange [I]nside [']quote
require("mini.ai").setup { n_lines = 500 } require("mini.ai").setup { n_lines = 500 }
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
-- - saiw) - [Surround [A]dd [I]nner [W]ord [)]Paren
-- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] [']
require("mini.surround").setup()
-- Simple and easy statusline. -- Simple and easy statusline.
-- You could remove this setup call if you don't like it, -- You could remove this setup call if you don't like it,
-- and try some other statusline plugin -- and try some other statusline plugin
@ -995,6 +1074,8 @@ require("lazy").setup({
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' }, -- { import = 'custom.plugins' },
}, { }, {
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "tokyonight-storm" } },
ui = { ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the -- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table

View file

@ -1,29 +1,36 @@
{ {
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "278376b953bcab65e2ab9508b5575d1f9a2cbac1" }, "conform.nvim": { "branch": "master", "commit": "e3263eabbfc1bdbc5b6a60ba8431b64e8dca0a79" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazy.nvim": { "branch": "main", "commit": "60cf258a9ae7fffe04bb31141141a91845158dcc" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
"luasnip": { "branch": "master", "commit": "29417eea5b7c4b6beda105ced072855101d9680e" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "919b953f044d97a2243cc2d1f0b316a199434127" }, "mini.nvim": { "branch": "main", "commit": "998cfcf1fdd0a6830d0fc35f1c054a6f55de1e7f" },
"nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
"nvim-lspconfig": { "branch": "master", "commit": "28b205ebe73a18f401e040585106f9bafd8ff21f" }, "neotest-golang": { "branch": "main", "commit": "df6e3f34ae65f2520db798481a9d3f97581899b7" },
"nvim-tree.lua": { "branch": "master", "commit": "14039337a563f4efd72831888f332a15585f0ea1" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-treesitter": { "branch": "master", "commit": "00d219068385a4aa80859d4606ad6e03af6faa83" }, "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "8e40904e49bbad5812798eb54be8c00d77cdd301" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "37dc9233a473dd6c3f54456ef9994d8f77c80211" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "2e1daa1d164ad8cc3e99b44ca68e990888a66038" }, "tokyonight.nvim": { "branch": "main", "commit": "ce91ba480070c95f40753e4663e32b4632ac6db3" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } "which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
} }

View file

@ -8,7 +8,7 @@ client.focused_inactive #88c0d0 #2e3440 #d8dee9 #4c566a #4c566a
client.unfocused #88c0d0 #2e3440 #d8dee9 #4c566a #4c566a client.unfocused #88c0d0 #2e3440 #d8dee9 #4c566a #4c566a
client.urgent #ebcb8b #ebcb8b #2e3440 #8fbcbb #ebcb8b client.urgent #ebcb8b #ebcb8b #2e3440 #8fbcbb #ebcb8b
workspace_layout default workspace_layout tabbed
# default_border normal # default_border normal
# default_floating_border none # default_floating_border none
# font pango:monospace 0.001 # font pango:monospace 0.001
@ -63,10 +63,8 @@ output $laptop {
bindswitch --reload --locked lid:on output $laptop disable bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable bindswitch --reload --locked lid:off output $laptop enable
workspace 1 output $laptop
workspace 1 output $external workspace 1 output $external
workspace 2 output $external
workspace 3 output $external
workspace 4 output $external
focus_on_window_activation focus focus_on_window_activation focus
@ -87,8 +85,8 @@ input "type:pointer" {
} }
input "type:keyboard" { input "type:keyboard" {
repeat_delay 200 repeat_delay 400
repeat_rate 100 repeat_rate 50
xkb_layout us,ru,ua xkb_layout us,ru,ua
xkb_options "grp:alt_space_toggle,ctrl:swap_lalt_lctl" xkb_options "grp:alt_space_toggle,ctrl:swap_lalt_lctl"
} }
@ -102,6 +100,7 @@ input "type:keyboard" {
# #
# Basics: # Basics:
# #
bindsym $mod+g exec $term fish -c y
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
bindsym $mod+Space exec $menu bindsym $mod+Space exec $menu
@ -229,7 +228,7 @@ bindsym $mod+r mode "resize"
### Autostart ### Autostart
# #
exec udiskie -t
exec syncthing serve exec syncthing serve
exec swaylock exec swaylock
exec tuxedo-control-center --tray exec tuxedo-control-center --tray