Updated script

This commit is contained in:
Christoffer Martinsson 2025-05-18 21:43:45 +02:00
parent 51050b3782
commit 156be53fdc

View File

@ -101,7 +101,6 @@ vim.opt.rtp:prepend(lazypath)
------------------------------------------------------------------- -------------------------------------------------------------------
require("lazy").setup({ require("lazy").setup({
-- Color scheme ------------------------------------------
{ {
dir = "~/linuxbox/nightly_cm.nvim", dir = "~/linuxbox/nightly_cm.nvim",
lazy = false, lazy = false,
@ -111,7 +110,6 @@ require("lazy").setup({
end, end,
}, },
-- LSP ----------------------------------------------------
{ {
"folke/lazydev.nvim", "folke/lazydev.nvim",
ft = "lua", -- only load on lua files ft = "lua", -- only load on lua files
@ -123,7 +121,6 @@ require("lazy").setup({
}, },
{ {
-- Main LSP Configuration
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { dependencies = {
{ "j-hui/fidget.nvim", opts = {} }, { "j-hui/fidget.nvim", opts = {} },
@ -165,12 +162,11 @@ require("lazy").setup({
end, end,
}) })
-- Diagnostic Config
vim.diagnostic.config({ vim.diagnostic.config({
severity_sort = true, severity_sort = true,
float = { border = "rounded", source = "if_many" }, float = { border = "rounded", source = "if_many" },
underline = { severity = vim.diagnostic.severity.ERROR }, underline = { severity = vim.diagnostic.severity.ERROR },
signs = vim.g.have_nerd_font and { signs = {
text = { text = {
[vim.diagnostic.severity.ERROR] = "󰅚 ", [vim.diagnostic.severity.ERROR] = "󰅚 ",
[vim.diagnostic.severity.WARN] = "󰀪 ", [vim.diagnostic.severity.WARN] = "󰀪 ",
@ -255,7 +251,7 @@ require("lazy").setup({
}, },
}, },
{ -- Autocompletion {
"saghen/blink.cmp", "saghen/blink.cmp",
event = "VimEnter", event = "VimEnter",
version = "1.*", version = "1.*",
@ -303,7 +299,7 @@ require("lazy").setup({
}, },
}, },
{ -- Highlight, edit, and navigate code {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
main = "nvim-treesitter.configs", -- Sets main module to use for opts main = "nvim-treesitter.configs", -- Sets main module to use for opts
@ -332,7 +328,6 @@ require("lazy").setup({
}, },
}, },
-- File explorer -------------------------------------------
{ {
"ibhagwan/fzf-lua", "ibhagwan/fzf-lua",
dependencies = { "echasnovski/mini.icons" }, dependencies = { "echasnovski/mini.icons" },
@ -364,18 +359,6 @@ require("lazy").setup({
}, },
}, },
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed.
"ibhagwan/fzf-lua", -- optional
},
},
-- GUI ------------------------------------------------------
{ {
"mrjones2014/smart-splits.nvim", "mrjones2014/smart-splits.nvim",
lazy = false, lazy = false,
@ -385,7 +368,6 @@ require("lazy").setup({
}, },
{ {
-- Set lualine as statusline
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
opts = { opts = {
options = { options = {
@ -427,18 +409,24 @@ require("lazy").setup({
{ "echasnovski/mini.icons", version = "*", opts = {} }, { "echasnovski/mini.icons", version = "*", opts = {} },
{ "echasnovski/mini.pairs", version = "*", opts = {} }, { "echasnovski/mini.pairs", version = "*", opts = {} },
{ "echasnovski/mini.surround", version = "*", opts = {} },
{ {
"echasnovski/mini.files", "echasnovski/mini.files",
version = "*", version = "*",
opts = { mappings = { opts = { mappings = {
go_in_plus = "l", go_n_plus = "l",
go_out = "h", go_out = "h",
go_out_plus = "H", go_out_plus = "H",
} }, } },
}, },
{ {
"lewis6991/gitsigns.nvim", "karb94/neoscroll.nvim",
opts = { duration_multiplier = 0.5 },
},
{
"lews6991/gitsigns.nvim",
opts = { opts = {
signs = { signs = {
add = { text = "" }, add = { text = "" },
@ -462,6 +450,8 @@ require("lazy").setup({
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
main = "ibl", main = "ibl",
---@module "ibl"
---@type ibl.config
opts = { opts = {
scope = { scope = {
show_end = false, show_end = false,
@ -489,7 +479,6 @@ require("lazy").setup({
opts = {}, opts = {},
}, },
-- Utils ---------------------------------------------------
{ {
"max397574/better-escape.nvim", "max397574/better-escape.nvim",
opts = { timeout = 300 }, opts = { timeout = 300 },
@ -502,14 +491,6 @@ require("lazy").setup({
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/plenary.nvim" },
opts = {}, opts = {},
}, },
{
"phaazon/hop.nvim",
branch = "v2", -- optional but strongly recommended
opts = {
keys = "etovxqpdygfblzhckisuran",
},
},
}, {}) }, {})
-- resizing splits -- resizing splits
@ -534,9 +515,8 @@ vim.keymap.set({ "n", "v" }, "d", '"+d', { noremap = true, silent = true })
-- vim.keymap.set({ 'n', 'v' }, 'x', '"+x', { noremap = true, silent = true }) -- vim.keymap.set({ 'n', 'v' }, 'x', '"+x', { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "p", '"+p', { noremap = true, silent = true }) vim.keymap.set({ "n", "v" }, "p", '"+p', { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "P", '"+P', { noremap = true, silent = true }) vim.keymap.set({ "n", "v" }, "P", '"+P', { noremap = true, silent = true })
--Other -- Other
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>") vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
vim.keymap.set("n", "s", ":HopWord<cr>", { desc = "hop", silent = true })
vim.keymap.set("n", "<tab>", ":tabNext<cr>", { desc = "Next tab", silent = true }) vim.keymap.set("n", "<tab>", ":tabNext<cr>", { desc = "Next tab", silent = true })
vim.keymap.set("n", "<C-s>", ":write<cr>", { desc = "Save", silent = true }) vim.keymap.set("n", "<C-s>", ":write<cr>", { desc = "Save", silent = true })
vim.keymap.set("n", "<C-q>", ":quit<cr>", { desc = "Quit", silent = true }) vim.keymap.set("n", "<C-q>", ":quit<cr>", { desc = "Quit", silent = true })