Added minimap and a keybind for showing only errors in trouble

master
Wynd 2024-08-03 23:38:33 +03:00
parent 68846f7130
commit 0750e72b69
10 changed files with 94 additions and 43 deletions

View File

@ -54,7 +54,7 @@ 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 = "memory" proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False. #* Reverse sorting order, True or False.
proc_reversed = False proc_reversed = False

View File

@ -2,37 +2,39 @@
## plugins used ## plugins used
- [dressing.nvim](https://github.com/stevearc/dressing.nvim.git) - [nvim-surround](https://github.com/kylechui/nvim-surround.git)
- [lspkind.nvim](https://github.com/onsails/lspkind.nvim.git) - [mini.pairs](https://github.com/echasnovski/mini.pairs.git)
- [lazy.nvim](https://github.com/folke/lazy.nvim.git)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git)
- [conform.nvim](https://github.com/stevearc/conform.nvim.git)
- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git) - [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git)
- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp.git) - [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git)
- [vim-cool](https://github.com/romainl/vim-cool.git)
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git)
- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git)
- [dressing.nvim](https://github.com/stevearc/dressing.nvim.git)
- [image.nvim](https://github.com/3rd/image.nvim.git)
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git)
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git) - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git)
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim.git)
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
- [twilight.nvim](https://github.com/folke/twilight.nvim.git)
- [lsp-zero.nvim](https://github.com/VonHeikemen/lsp-zero.nvim.git)
- [lazydev.nvim](https://github.com/folke/lazydev.nvim.git)
- [luvit-meta](https://github.com/Bilal2453/luvit-meta.git)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp.git)
- [lspkind.nvim](https://github.com/onsails/lspkind.nvim.git)
- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp.git)
- [mini.map](https://github.com/echasnovski/mini.map.git)
- [cmp-path](https://github.com/hrsh7th/cmp-path.git) - [cmp-path](https://github.com/hrsh7th/cmp-path.git)
- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer.git) - [cmp-buffer](https://github.com/hrsh7th/cmp-buffer.git)
- [LuaSnip](https://github.com/L3MON4D3/LuaSnip.git) - [LuaSnip](https://github.com/L3MON4D3/LuaSnip.git)
- [lsp-zero.nvim](https://github.com/VonHeikemen/lsp-zero.nvim.git)
- [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip.git)
- [luvit-meta](https://github.com/Bilal2453/luvit-meta.git)
- [catppuccin](https://github.com/catppuccin/nvim.git)
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
- [nvim-autopairs](https://github.com/windwp/nvim-autopairs.git)
- [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
- [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
- [nvim-surround](https://github.com/kylechui/nvim-surround.git)
- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git)
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git)
- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git)
- [conform.nvim](https://github.com/stevearc/conform.nvim.git)
- [image.nvim](https://github.com/3rd/image.nvim.git)
- [twilight.nvim](https://github.com/folke/twilight.nvim.git)
- [trouble.nvim](https://github.com/folke/trouble.nvim.git)
- [zen-mode.nvim](https://github.com/folke/zen-mode.nvim.git) - [zen-mode.nvim](https://github.com/folke/zen-mode.nvim.git)
- [which-key.nvim](https://github.com/folke/which-key.nvim.git) - [which-key.nvim](https://github.com/folke/which-key.nvim.git)
- [lazy.nvim](https://github.com/folke/lazy.nvim.git) - [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) - [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip.git)
- [lazydev.nvim](https://github.com/folke/lazydev.nvim.git) - [trouble.nvim](https://github.com/folke/trouble.nvim.git)
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git) - [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim.git) - [catppuccin](https://github.com/catppuccin/nvim.git)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp.git) - [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
- [fidget.nvim](https://github.com/j-hui/fidget.nvim.git) - [fidget.nvim](https://github.com/j-hui/fidget.nvim.git)

View File

@ -16,9 +16,10 @@
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" },
"minimap.vim": { "branch": "master", "commit": "395378137e6180762d5b963ca9ad5ac2db5d3283" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
@ -31,6 +32,7 @@
"todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" },
"trouble.nvim": { "branch": "main", "commit": "4453fea6bb597830fbd58d2c484612f37b97bd8c" }, "trouble.nvim": { "branch": "main", "commit": "4453fea6bb597830fbd58d2c484612f37b97bd8c" },
"twilight.nvim": { "branch": "main", "commit": "da4fe0a9e1397ecd9b012c52fb34313fbd3b862f" }, "twilight.nvim": { "branch": "main", "commit": "da4fe0a9e1397ecd9b012c52fb34313fbd3b862f" },
"vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" },
"which-key.nvim": { "branch": "main", "commit": "af4ded85542d40e190014c732fa051bdbf88be3d" }, "which-key.nvim": { "branch": "main", "commit": "af4ded85542d40e190014c732fa051bdbf88be3d" },
"zen-mode.nvim": { "branch": "main", "commit": "21976479c7a0146b05a42707cf91c86b1e510945" } "zen-mode.nvim": { "branch": "main", "commit": "21976479c7a0146b05a42707cf91c86b1e510945" }
} }

View File

@ -1,13 +1,19 @@
local autocmd = vim.api.nvim_create_autocmd
local user_command = vim.api.nvim_create_user_command
-- used for when lazyness takes over and I'm using a mouse to click around in neo-tree -- used for when lazyness takes over and I'm using a mouse to click around in neo-tree
-- if insert mode is active then neo-tree won't behave as expected, so we want to stop it -- if insert mode is active then neo-tree won't behave as expected, so we want to stop it
vim.api.nvim_create_autocmd("BufEnter", { autocmd("BufEnter", {
pattern = { "*neo-tree*" }, pattern = { "*" },
callback = function() callback = function()
vim.cmd("stopinsert") local filetype = vim.filetype.match({ buf = 0 })
if filetype == nil then
vim.cmd("stopinsert")
end
end, end,
}) })
vim.api.nvim_create_user_command("ListPlugins", function() user_command("ListPlugins", function()
local plugins = require("lazy").plugins() local plugins = require("lazy").plugins()
local f, err = io.open("plugins", "w+") local f, err = io.open("plugins", "w+")
@ -23,7 +29,7 @@ vim.api.nvim_create_user_command("ListPlugins", function()
end end
end, {}) end, {})
vim.api.nvim_create_user_command("CountWords", function() user_command("CountWords", function()
local words = vim.fn.wordcount()["words"] local words = vim.fn.wordcount()["words"]
print("Words: " .. words) print("Words: " .. words)
end, {}) end, {})

View File

@ -50,10 +50,13 @@ map("n", "<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbol
map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" }) map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" })
-- nvimtree -- neo-tree
map("n", "<leader>n", "<cmd>Neotree toggle<CR>", { desc = "Toggle Filetree Window" }) map("n", "<leader>n", "<cmd>Neotree toggle<CR>", { desc = "Toggle Filetree Window" })
map("n", "<leader>e", "<cmd>Neotree focus<CR>", { desc = "Focus Filetree Window" }) map("n", "<leader>e", "<cmd>Neotree focus<CR>", { desc = "Focus Filetree Window" })
-- minimap
map("n", "<leader>m", MiniMap.toggle, { desc = "Toggle Minimap" })
-- comment -- comment
-- _ represents the / key here -- _ represents the / key here
local comment_api = require("Comment.api") local comment_api = require("Comment.api")
@ -68,6 +71,12 @@ end, { desc = "Toggle Comment" })
-- trouble -- trouble
map("n", "<leader>td", "<cmd>Trouble diagnostics toggle<CR>", { desc = "[T]rouble [D]iagnostics" }) map("n", "<leader>td", "<cmd>Trouble diagnostics toggle<CR>", { desc = "[T]rouble [D]iagnostics" })
map(
"n",
"<leader>te",
"<cmd>Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR<CR>",
{ desc = "[T]rouble [E]rrors" }
)
map("n", "<leader>tt", "<cmd>Trouble todo toggle<CR>", { desc = "[T]rouble [T]odo" }) map("n", "<leader>tt", "<cmd>Trouble todo toggle<CR>", { desc = "[T]rouble [T]odo" })
-- whichkey -- whichkey

View File

@ -20,7 +20,7 @@ o.numberwidth = 2
o.undofile = true o.undofile = true
-- sync clipboard between OS and Neovim. -- sync clipboard between OS and Neovim.
o.clipboard = "unnamedplus" o.clipboard = "unnamedplus"
o.hlsearch = false o.hlsearch = true
o.incsearch = true o.incsearch = true
o.scrolloff = 8 o.scrolloff = 8
o.updatetime = 50 o.updatetime = 50

View File

@ -21,6 +21,14 @@ return {
capabilities = capabilities, capabilities = capabilities,
settings = { settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {
cargo = {
buildScripts = {
enable = true,
},
},
procMacro = {
enable = true,
},
checkOnSave = { checkOnSave = {
command = "clippy", command = "clippy",
}, },

View File

@ -39,7 +39,7 @@ return {
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
opts = { opts = {
options = { options = {
disabled_filetypes = { "neo-tree" }, disabled_filetypes = { "neo-tree", "minimap" },
globalstatus = true, globalstatus = true,
}, },
sections = { sections = {

View File

@ -1,11 +1,4 @@
return { return {
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
opts = {},
},
{ {
"windwp/nvim-ts-autotag", "windwp/nvim-ts-autotag",
opts = {}, opts = {},
@ -28,4 +21,34 @@ return {
event = "VeryLazy", event = "VeryLazy",
opts = {}, opts = {},
}, },
{
"echasnovski/mini.pairs",
version = false,
opts = {},
},
{
"echasnovski/mini.map",
version = false,
init = function()
local mini = require("mini.map")
mini.setup({
integrations = {
mini.gen_integration.builtin_search(),
mini.gen_integration.diagnostic(),
},
window = {
focusable = true,
width = 20,
winblend = 0,
},
})
end,
},
{
"romainl/vim-cool",
init = function() end,
},
} }

1
.zshrc
View File

@ -79,6 +79,7 @@ alias untar="tar -xvzf"
alias myip="curl http://ipecho.net/plain; echo" alias myip="curl http://ipecho.net/plain; echo"
alias diskspace="df -ht ext4" alias diskspace="df -ht ext4"
alias since="days_since" alias since="days_since"
alias ytd="yt-dlp -x --audio-format wav"
# git shortcuts # git shortcuts
alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges" alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges"