[Perf] Start performance improvements
This commit is contained in:
@@ -14,7 +14,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins.nav" },
|
{ import = "plugins.nav" },
|
||||||
{ import = "plugins.nav.telescope" },
|
|
||||||
{ import = "plugins.lsp" },
|
{ import = "plugins.lsp" },
|
||||||
{ import = "plugins.style" },
|
{ import = "plugins.style" },
|
||||||
{ import = "plugins.util" },
|
{ import = "plugins.util" },
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ return {
|
|||||||
"mfussenegger/nvim-jdtls",
|
"mfussenegger/nvim-jdtls",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local enable = vim.lsp.enable
|
|
||||||
|
|
||||||
-- Change the Diagnostic symbols in the sign column (gutter)
|
-- Change the Diagnostic symbols in the sign column (gutter)
|
||||||
local signs = { Error = " ", Warn = " ", Hint = "", Info = " " }
|
local signs = { Error = " ", Warn = " ", Hint = "", Info = " " }
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
-- git buffer integration
|
-- git buffer integration
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
event = "BufNew",
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup({
|
require("gitsigns").setup({
|
||||||
count_chars = { "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹", ["+"] = "⁺" },
|
count_chars = { "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹", ["+"] = "⁺" },
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ return {
|
|||||||
-- For major updates, this must be adjusted manually.
|
-- For major updates, this must be adjusted manually.
|
||||||
version = "^1.0.0",
|
version = "^1.0.0",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
@@ -81,17 +84,7 @@ return {
|
|||||||
|
|
||||||
-- Old Files
|
-- Old Files
|
||||||
opts.desc = "Show recent files"
|
opts.desc = "Show recent files"
|
||||||
vim.keymap.set("n", "<leader>fof", builtin.oldfiles, opts)
|
vim.keymap.set("n", "<leader>fr", builtin.oldfiles, opts)
|
||||||
|
|
||||||
-- Frecency (Old files, but better)
|
|
||||||
local function run_frecency()
|
|
||||||
require("telescope").extensions.frecency.frecency({
|
|
||||||
workspace = "CWD",
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.desc = "Show recent files (Frecency algorithm)"
|
|
||||||
vim.keymap.set("n", "<leader>fr", run_frecency, opts)
|
|
||||||
|
|
||||||
-- Quickfix Items
|
-- Quickfix Items
|
||||||
opts.desc = "Show quickfix items"
|
opts.desc = "Show quickfix items"
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-telescope/telescope-frecency.nvim",
|
|
||||||
-- install the latest stable version
|
|
||||||
version = "*",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("frecency")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
-- colorizes colors in code
|
-- colorizes colors in code
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
--cmd = 'ColorizerToggle',
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("colorizer").setup({
|
require("colorizer").setup({
|
||||||
filetypes = { "*" },
|
filetypes = { "*" },
|
||||||
|
|||||||
@@ -41,21 +41,13 @@ return {
|
|||||||
box_width = 50,
|
box_width = 50,
|
||||||
line_width = 70,
|
line_width = 70,
|
||||||
})
|
})
|
||||||
|
|
||||||
local opts = { silent = true }
|
|
||||||
|
|
||||||
opts.desc = "comment text box"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>cb", ":CBccbox<CR>", opts)
|
|
||||||
opts.desc = "comment text line"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>cl", ":CBllline<CR>", opts)
|
|
||||||
opts.desc = "comment line"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>ce", ":CBline<CR>", opts)
|
|
||||||
opts.desc = "comment highlight"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>ch", ":CBlcbox18<CR>", opts)
|
|
||||||
|
|
||||||
opts.desc = "delete comment box"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>cd", ":CBd<CR>", opts)
|
|
||||||
opts.desc = "yank comment box contents"
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>cy", ":CBy<CR>", opts)
|
|
||||||
end,
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>cb", ":CBccbox<CR>", mode = { "n", "v" }, desc = "Comment text box" },
|
||||||
|
{ "<leader>cl", ":CBllline<CR>", mode = { "n", "v" }, desc = "Comment text line" },
|
||||||
|
{ "<leader>ce", ":CBline<CR>", mode = { "n", "v" }, desc = "Comment line" },
|
||||||
|
{ "<leader>ch", ":CBlcbox18<CR>", mode = { "n", "v" }, desc = "Comment highlight" },
|
||||||
|
{ "<leader>cd", ":CBd<CR>", mode = { "n", "v" }, desc = "Delete comment box" },
|
||||||
|
{ "<leader>cy", ":CBy<CR>", mode = { "n", "v" }, desc = "Yank comment box content" }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ return {
|
|||||||
-- add comment keybinds
|
-- add comment keybinds
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
lazy = false,
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("Comment").setup()
|
require("Comment").setup()
|
||||||
require("Comment.ft").set("hyprlang", "#%s")
|
require("Comment.ft").set("hyprlang", "#%s")
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ return {
|
|||||||
-- status line
|
-- status line
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
local function getWords()
|
local function getWords()
|
||||||
local wc = vim.api.nvim_eval("wordcount()")
|
local wc = vim.api.nvim_eval("wordcount()")
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
|
||||||
-- add any options here
|
|
||||||
},
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
event = "BufRead",
|
||||||
opts = {
|
opts = {
|
||||||
{
|
{
|
||||||
signs = true, -- show icons in the signs column
|
signs = true, -- show icons in the signs column
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ return {
|
|||||||
"orjangj/neotest-ctest",
|
"orjangj/neotest-ctest",
|
||||||
"rouge8/neotest-rust",
|
"rouge8/neotest-rust",
|
||||||
},
|
},
|
||||||
|
keys = {},
|
||||||
config = function()
|
config = function()
|
||||||
local neotest = require("neotest")
|
local neotest = require("neotest")
|
||||||
local keymap = vim.keymap.set
|
local keymap = vim.keymap.set
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
config = function()
|
event = "InsertEnter",
|
||||||
require("nvim-ts-autotag").setup({
|
opts = {
|
||||||
opts = {
|
opts = {
|
||||||
-- Defaults
|
-- Defaults
|
||||||
enable_close = true, -- Auto close tags
|
enable_close = true, -- Auto close tags
|
||||||
enable_rename = true, -- Auto rename pairs of tags
|
enable_rename = true, -- Auto rename pairs of tags
|
||||||
enable_close_on_slash = true, -- Auto close on trailing </
|
enable_close_on_slash = true, -- Auto close on trailing </
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
-- similar to sticky scroll in vscode
|
-- similar to sticky scroll in vscode
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
event = "BufNew"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
-- Diffview
|
-- Diffview
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
config = function()
|
keys = {
|
||||||
local opts = require('utils').opts
|
{ "<leader><leader>gd", ":DiffviewOpen<CR>", desc = "Open diffview" },
|
||||||
vim.keymap.set("n", "<leader><leader>gd", ":DiffviewOpen<CR>", opts("Start diffview"))
|
{ "<leader><leader>gf", ":DiffviewFileHistory<CR>", desc = "View file history" },
|
||||||
vim.keymap.set("n", "<leader><leader>gf", ":DiffviewFileHistory<CR>", opts("View file history"))
|
{ "<leader><leader>gc", ":DiffviewClose<CR>", desc = "Close diffview" },
|
||||||
vim.keymap.set("n", "<leader><leader>gc", ":DiffviewClose<CR>", opts("Close diffview"))
|
{ "<leader><leader>gr", ":DiffviewRefresh<CR>", desc = "Refresh diffview" },
|
||||||
vim.keymap.set("n", "<leader><leader>gr", ":DiffviewRefresh<CR>", opts("Refresh diffview"))
|
},
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"LintaoAmons/scratch.nvim",
|
"LintaoAmons/scratch.nvim",
|
||||||
event = "VeryLazy",
|
keys = {
|
||||||
config = function()
|
{ "<leader><leader>+", ":Scratch<CR>", desc = "Open a scratchpad" }
|
||||||
local opts = require("utils").opts
|
}
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader><leader>+", ":Scratch<CR>", opts("Open a scratchpad"))
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user