feat: updated plugins and editor configuration

This commit is contained in:
David Ibia
2024-01-01 21:03:31 +01:00
parent 2537f12e0c
commit e454b4a8b9
36 changed files with 497 additions and 195 deletions

View File

@@ -1 +1,4 @@
require("absolute") require("absolute")
vim.g.loaded_perl_provider = 0
vim.g.loaded_ruby_provider = 0

View File

@@ -1,27 +1,37 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
"bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" }, "copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "81c25389c855dd0e0fad4863f7464e1389e45ca3" },
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" }, "lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" }, "mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
"nightfly": { "branch": "master", "commit": "90d85c8a094266122fb1fd173e7bcc0cd0efdd49" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "8e7223e138590c1bd9d86d3de810e65939d8b12f" },
"nvim-lspconfig": { "branch": "master", "commit": "9bedcfed749755e43fc8bed46f85ce2044fe3b77" }, "nvim-lspconfig": { "branch": "master", "commit": "9bedcfed749755e43fc8bed46f85ce2044fe3b77" },
"nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" }, "nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" },
"nvim-treesitter": { "branch": "master", "commit": "e49f1e8ef3e8450a8446cb1f2bbb53c919f60b6d" }, "nvim-treesitter": { "branch": "master", "commit": "e49f1e8ef3e8450a8446cb1f2bbb53c919f60b6d" },
"nvim-web-devicons": { "branch": "master", "commit": "cff25ce621e6d15fae0b0bfe38c00be50ce38468" }, "nvim-web-devicons": { "branch": "master", "commit": "cff25ce621e6d15fae0b0bfe38c00be50ce38468" },
"nvim_lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"rose-pine": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" }, "rose-pine": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" }, "undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" }, "vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" } "vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }
} }

View File

@@ -0,0 +1,20 @@
require("bufferline").setup {
options = {
mode = "tabs",
separator_style = "slant",
}
}
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("n", "<leader>1", "<cmd>BufferLineGoToBuffer 1<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>2", "<cmd>BufferLineGoToBuffer 2<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>3", "<cmd>BufferLineGoToBuffer 3<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>4", "<cmd>BufferLineGoToBuffer 4<CR>", opts)
-- I want to be to close the current tab with a single keypress
vim.api.nvim_set_keymap("n", "<leader>w", "<cmd>tabclose<CR>", opts)
-- I want to be able to create a new tab with a single keypress
vim.api.nvim_set_keymap("n", "<leader>t", "<cmd>tabnew<CR>", opts)

View File

@@ -0,0 +1,8 @@
function SetTheme(color)
color = color or "rose-pine"
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
SetTheme("nightfly")

View File

@@ -0,0 +1,150 @@
-- Setup language servers.
local lspconfig = require('lspconfig')
local cmp_nvim_lsp = require("cmp_nvim_lsp")
local opts = { noremap = true, silent = true }
local on_attach = function(client, bufnr)
opts.buffer = bufnr
-- Enable completion triggered by <c-x><c-o>
-- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
opts.desc = "Go to declaration"
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
opts.desc = "Go to definitions"
vim.keymap.set('n', 'gd', "<cmd>Telescope lsp_definitions<CR>", opts)
opts.desc = "Show documentation for what is under cursor"
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
opts.desc = "Show LSP Implementation"
vim.keymap.set('n', 'gi', "<cmd>Telescope lsp_implementations<CR>", opts)
opts.desc = "Get Help"
vim.keymap.set('n', '<C-h>', vim.lsp.buf.signature_help, opts)
-- vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
-- vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
-- vim.keymap.set('n', '<leader>wl', function()
-- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
-- end, opts)
opts.desc = "Show LSP type definitions"
vim.keymap.set('n', 'gt', "<cmd>Telescope lsp_type_definitions<CR>", opts)
opts.desc = "Smart rename"
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
opts.desc = "See available code actions"
vim.keymap.set({ 'n', 'v' }, '<leader>vca', vim.lsp.buf.code_action, opts)
opts.desc = "Show LSP references"
vim.keymap.set('n', '<leader>vrr', "<cmd>Telescope lsp_references<CR>", opts)
opts.desc = "Format File"
vim.keymap.set('n', '<leader>f', function()
vim.lsp.buf.format { async = true }
end, opts)
opts.desc = "Restart LSP"
vim.keymap.set("n", "<leader>rs", "<cmd>LspRestart<CR>", opts)
end
local capabilities = cmp_nvim_lsp.default_capabilities()
-- Change the Diagnostic symbols in the sign column (gutter)
local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
-- configure html server
lspconfig["html"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure typescript server with plugin
lspconfig["tsserver"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure css server
lspconfig["cssls"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure tailwindcss server
lspconfig["tailwindcss"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure svelte server
lspconfig["svelte"].setup({
capabilities = capabilities,
on_attach = function(client, bufnr)
on_attach(client, bufnr)
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "*.js", "*.ts" },
callback = function(ctx)
if client.name == "svelte" then
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file })
end
end,
})
end,
})
-- configure emmet language server
lspconfig["emmet_ls"].setup({
capabilities = capabilities,
on_attach = on_attach,
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" },
})
-- configure python server
lspconfig["pyright"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
lspconfig.rust_analyzer.setup({
-- Server-specific settings. See `:help lspconfig-setup`
on_attach = on_attach,
capabilities = capabilities,
settings = {
['rust-analyzer'] = {},
},
})
-- configure lua server (with special settings)
lspconfig["lua_ls"].setup({
capabilities = capabilities,
on_attach = on_attach,
settings = { -- custom settings for lua
Lua = {
-- make the language server recognize "vim" global
diagnostics = {
globals = { "vim" },
},
workspace = {
-- make language server aware of runtime files
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.stdpath("config") .. "/lua"] = true,
},
},
},
},
})

View File

@@ -1,51 +0,0 @@
local lsp = require('lsp-zero')
require("mason").setup();
require("mason-lspconfig").setup({
ensure_installed = {
"tsserver",
"eslint",
"rust_analyzer"
},
})
lsp.preset("recommended")
local cmp = require("cmp")
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local cmp_mappings = lsp.defaults.cmp_mappings({
["<C-p>"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n>"] = cmp.mapping.select_next_item(cmp_select),
["<C-y>"] = cmp.mapping.confirm({select = true}),
["<C-Space>"] = cmp.mapping.complete(),
})
lsp.set_preferences({
sign_icons = { }
})
lsp.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.lsp.buf.open_float() end, opts)
vim.keymap.set("n", "[d", function() vim.lsp.buf.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.lsp.buf.goto_prev() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end)
lsp.setup()

View File

@@ -0,0 +1,65 @@
local lualine = require("lualine")
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
local colors = {
blue = "#65D1FF",
green = "#3EFFDC",
violet = "#FF61EF",
yellow = "#FFDA7B",
red = "#FF4A4A",
fg = "#c3ccdc",
bg = "#112638",
inactive_bg = "#2c3043",
}
local my_lualine_theme = {
normal = {
a = { bg = colors.blue, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
insert = {
a = { bg = colors.green, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
visual = {
a = { bg = colors.violet, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
command = {
a = { bg = colors.yellow, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
replace = {
a = { bg = colors.red, fg = colors.bg, gui = "bold" },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
inactive = {
a = { bg = colors.inactive_bg, fg = colors.semilightgray, gui = "bold" },
b = { bg = colors.inactive_bg, fg = colors.semilightgray },
c = { bg = colors.inactive_bg, fg = colors.semilightgray },
},
}
-- configure lualine with modified theme
lualine.setup({
options = {
theme = my_lualine_theme,
},
sections = {
lualine_x = {
{
lazy_status.updates,
cond = lazy_status.has_updates,
color = { fg = "#ff9e64" },
},
{ "encoding" },
{ "fileformat" },
{ "filetype" },
},
},
})

View File

@@ -0,0 +1,16 @@
require("mason").setup();
require("mason-lspconfig").setup({
ensure_installed = {
"tsserver",
"eslint",
"rust_analyzer",
"html",
"emmet_ls",
"lua_ls",
"tailwindcss",
"svelte",
"cssls",
"pyright"
},
automatic_installation = true,
})

View File

@@ -0,0 +1,11 @@
local map = require("mini.map")
require("mini.map").setup({
integrations = {
map.gen_integration.builtin_search(),
map.gen_integration.gitsigns(),
map.gen_integration.diagnostic()
},
})
vim.keymap.set("n", "<leader>mc", map.close)
vim.keymap.set("n", "<leader>mo", map.open)

View File

@@ -2,31 +2,35 @@ local cmp = require("cmp")
local luasnip = require("luasnip") local luasnip = require("luasnip")
local lspkind = require("lspkind") local lspkind = require("lspkind")
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets) -- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
cmp.setup({
completion = { completion = {
completeopt = "menu,menuone,preview,noselect", completeopt = "menu,menuone,preview,noselect",
}, },
snippet = { -- configure how nvim-cmp interacts with snippet engine snippet = { -- configure how nvim-cmp interacts with snippet engine
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
-- sources for autocompletion mapping = cmp.mapping.preset.insert({
sources = cmp.config.sources({ ["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<CR>"] = cmp.mapping.confirm({ select = false }) -- accept current selection
}),
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "luasnip" }, -- snippets { name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer { name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths { name = "path" }, -- file system paths
}), }),
-- configure lspkind for vs-code like pictograms in completion menu -- configure lspkind for vs-code like pictograms in completion menu
formatting = { formatting = {
format = lspkind.cmp_format({ format = lspkind.cmp_format({
maxwidth = 50, maxwidth = 50,
ellipsis_char = "...", ellipsis_char = "...",
}), }),
}, },
}) })

View File

@@ -20,28 +20,28 @@ nvimtree.setup({
icons = { icons = {
glyphs = { glyphs = {
folder = { folder = {
arrow_closed = "", -- arrow when folder is closed arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open arrow_open = "", -- arrow when folder is open
} }
} }
} }
}, },
-- disable window_picker for -- disable window_picker for
-- explorer to work well with -- explorer to work well with
-- window splits -- window splits
actions = { actions = {
open_file = { open_file = {
window_picker = { window_picker = {
enable = false, enable = false,
},
}, },
}, },
},
filters = { filters = {
custom = { ".DS_Store" }, custom = { ".DS_Store" },
}, },
git = { git = {
ignore = false, ignore = false,
} }
}) })

View File

@@ -1,22 +1,22 @@
require'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed) -- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = {"rust", "javascript", "typescript", "python", "c", "lua", "vim", "vimdoc", "query" }, ensure_installed = { "rust", "javascript", "typescript", "python", "c", "lua", "vim", "vimdoc", "query" },
-- Install parsers synchronously (only applied to `ensure_installed`) -- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = false,
-- Automatically install missing parsers when entering buffer -- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true, auto_install = true,
---- If you need to change the installation directory of the parsers (see -> Advanced Setup) ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = { highlight = {
enable = true, enable = true,
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights. -- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages -- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
} }

View File

@@ -1,4 +0,0 @@
vim.cmd.colorscheme("rose-pine")
vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"})

View File

@@ -1,6 +1,11 @@
local telescope = require("telescope")
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {}) telescope.setup {}
vim.keymap.set("n", '<leader>pf', builtin.find_files, { desc = "Fuzzy find files in cwd" })
vim.keymap.set("n", '<leader>pr', builtin.oldfiles, { desc = "Fuzzy find recent files" })
vim.keymap.set("n", '<C-p>', builtin.git_files, { desc = "Fuzzy find files in git in cwd" })
vim.keymap.set('n', '<leader>ps', function() vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({search = vim.fn.input("Grep > ") }); builtin.grep_string({ search = vim.fn.input("Grep > ") });
end) end, { desc = "Find string under cursor in cwd" })

View File

@@ -1,14 +1,29 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup("absolute.plugins") require("lazy").setup({
{ import = "absolute.plugins" }
}, {
install = {
colorscheme = { "nightfly" },
},
checker = {
enabled = true,
notify = false,
},
change_detection = {
notify = false
}
})
require("absolute.after.colorscheme");

View File

@@ -0,0 +1,8 @@
return {
"akinsho/bufferline.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
config = function()
require("absolute.after.bufferline")
end
}

View File

@@ -0,0 +1,5 @@
return {
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
config = true
}

View File

@@ -0,0 +1,4 @@
return {
"stevearc/dressing.nvim",
event = "VeryLazy"
}

View File

@@ -1,7 +1,7 @@
return { return {
"theprimeagen/harpoon", "theprimeagen/harpoon",
dependencies = { 'nvim-lua/plenary.nvim' }, dependencies = { 'nvim-lua/plenary.nvim' },
config = function() config = function()
require("absolute.after.harpoon") require("absolute.after.harpoon")
end end
} }

View File

@@ -0,0 +1,11 @@
return {
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{ "hrsh7th/cmp-nvim-lsp", name = "nvim_lsp" },
{ "antosha417/nvim-lsp-file-operations", config = true },
},
config = function()
require("absolute.after.lsp-config")
end
}

View File

@@ -1,15 +0,0 @@
return {
'VonHeikemen/lsp-zero.nvim', branch = 'v3.x',
dependencies = {
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'neovim/nvim-lspconfig',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/nvim-cmp',
'L3MON4D3/LuaSnip',
},
config = function()
require("absolute.after.lsp-zero")
end
}

View File

@@ -0,0 +1,7 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require("absolute.after.lualine")
end
}

View File

@@ -0,0 +1,10 @@
return {
'williamboman/mason.nvim',
dependencies = {
'williamboman/mason-lspconfig.nvim',
},
config = function()
require("absolute.after.mason")
end
}

View File

@@ -0,0 +1,7 @@
return {
"echasnovski/mini.nvim",
version = "*", -- Stable Version
config = function()
require("absolute.after.mini")
end
}

View File

@@ -0,0 +1,5 @@
return {
"bluz71/vim-nightfly-colors",
name = "nightfly",
lazy = false,
}

View File

@@ -4,14 +4,15 @@ return {
dependencies = { dependencies = {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer', 'hrsh7th/cmp-buffer', --source for text in buffer
'hrsh7th/cmp-path', 'hrsh7th/cmp-path', --source for file system paths
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-cmdline',
"saadparwaiz1/cmp_luasnip", "saadparwaiz1/cmp_luasnip", --source for autocompletion
"onsails/lspkind.nvim", "onsails/lspkind.nvim",
"L3MON4D3/LuaSnip", --Snippet Engine
"rafamadriz/friendly-snippets", --Useful snippets
}, },
config = function() config = function()
require("absolute.after.nvim-cmp") require("absolute.after.nvim-cmp")
end end
} }

View File

@@ -1,6 +1,6 @@
return { return {
"nvim-tree/nvim-tree.lua", "nvim-tree/nvim-tree.lua",
dependencies = {"nvim-tree/nvim-web-devicons"}, dependencies = { "nvim-tree/nvim-web-devicons" },
config = function() config = function()
require("absolute.after.nvim-tree"); require("absolute.after.nvim-tree");
end end

View File

@@ -1,6 +1,3 @@
return { return {
"nvim-treesitter/playground", "nvim-treesitter/playground",
} }

View File

@@ -1,7 +1,7 @@
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
config = function() config = function()
vim.cmd([[:TSUpdate]]) vim.cmd([[:TSUpdate]])
require("absolute.after.nvim-treesitter") require("absolute.after.nvim-treesitter")
end end
} }

View File

@@ -1,7 +1,4 @@
return { return {
'rose-pine/neovim', 'rose-pine/neovim',
name = 'rose-pine', name = 'rose-pine',
config = function()
require("absolute.after.rose-pine")
end
} }

View File

@@ -1,16 +1,11 @@
return { return {
'nvim-telescope/telescope.nvim', tag = '0.1.5', 'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim'}, branch = '0.1.x',
requires = { dependencies = {
{ "nvim-lua/plenary.nvim",
"nvim-telescope/telescope-fzf-native.nvim", "nvim-telescope/telescope-dap.nvim",
run = "make" },
}, config = function()
{ require("absolute.after.telescope")
"nvim-telescope/telescope-dap.nvim" end
} }
},
config = function()
require("absolute.after.telescope")
end
}

View File

@@ -1,6 +1,6 @@
return { return {
"mbbill/undotree", "mbbill/undotree",
config = function() config = function()
require("absolute.after.undotree") require("absolute.after.undotree")
end end
} }

View File

@@ -1,7 +1,7 @@
return { return {
"tpope/vim-fugitive", "tpope/vim-fugitive",
config = function() config = function()
require("absolute.after.vim-fugitive") require("absolute.after.vim-fugitive")
end end
} }

View File

@@ -0,0 +1,3 @@
return {
"szw/vim-maximizer"
}

View File

@@ -1,17 +1,17 @@
return { return {
"christoomey/vim-tmux-navigator", "christoomey/vim-tmux-navigator",
cmd = { cmd = {
"TmuxNavigateLeft", "TmuxNavigateLeft",
"TmuxNavigateDown", "TmuxNavigateDown",
"TmuxNavigateUp", "TmuxNavigateUp",
"TmuxNavigateRight", "TmuxNavigateRight",
"TmuxNavigatePrevious", "TmuxNavigatePrevious",
}, },
keys = { keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" }, { "<C-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" }, { "<C-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" }, { "<C-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" }, { "<C-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" }, { "<C-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
}, },
} }

View File

@@ -13,23 +13,38 @@ vim.keymap.set("n", "N", "Nzzzv")
vim.keymap.set("x", "<leader>p", [["_dP]]) vim.keymap.set("x", "<leader>p", [["_dP]])
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]]) vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
vim.keymap.set("n", "<leader>Y", [["+Y]]) vim.keymap.set("n", "<leader>Y", [["+Y]])
vim.keymap.set({"n", "v"}, "<leader>d", [["_d]]) vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
-- Alternate Escape (Easy to Reach)
vim.keymap.set("i", "<C-c>", "<Esc>") vim.keymap.set("i", "<C-c>", "<Esc>")
-- Disable Q - Nothing Good Ever Happens
vim.keymap.set("n", "Q", "<nop>") vim.keymap.set("n", "Q", "<nop>")
-- Format document with LSP Formatter
vim.keymap.set("n", "<leader>f", vim.lsp.buf.format) vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
-- Navigation Quick Fixes
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz") vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz") vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz") vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz") vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
-- Search Regex Keymap
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- Source File Keymap
vim.keymap.set("n", "<leader><leader>", function() vim.keymap.set("n", "<leader><leader>", function()
vim.cmd("so") vim.cmd("so")
end) end)
-- Manage VIM Maximizer
vim.keymap.set("n", "<leader>sm", "<cmd>MaximizerToggle<CR>")