mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat: updated plugins and editor configuration
This commit is contained in:
3
init.lua
3
init.lua
@@ -1 +1,4 @@
|
||||
require("absolute")
|
||||
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
|
||||
@@ -1,27 +1,37 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "81c25389c855dd0e0fad4863f7464e1389e45ca3" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
||||
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
|
||||
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
|
||||
"nightfly": { "branch": "master", "commit": "90d85c8a094266122fb1fd173e7bcc0cd0efdd49" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "8e7223e138590c1bd9d86d3de810e65939d8b12f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9bedcfed749755e43fc8bed46f85ce2044fe3b77" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "f1b3e6a7eb92da492bd693257367d9256839ed3d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "e49f1e8ef3e8450a8446cb1f2bbb53c919f60b6d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "cff25ce621e6d15fae0b0bfe38c00be50ce38468" },
|
||||
"nvim_lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"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" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" },
|
||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }
|
||||
}
|
||||
20
lua/absolute/after/bufferline.lua
Normal file
20
lua/absolute/after/bufferline.lua
Normal 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)
|
||||
8
lua/absolute/after/colorscheme.lua
Normal file
8
lua/absolute/after/colorscheme.lua
Normal 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")
|
||||
150
lua/absolute/after/lsp-config.lua
Normal file
150
lua/absolute/after/lsp-config.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -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()
|
||||
65
lua/absolute/after/lualine.lua
Normal file
65
lua/absolute/after/lualine.lua
Normal 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" },
|
||||
},
|
||||
},
|
||||
})
|
||||
16
lua/absolute/after/mason.lua
Normal file
16
lua/absolute/after/mason.lua
Normal 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,
|
||||
})
|
||||
11
lua/absolute/after/mini.lua
Normal file
11
lua/absolute/after/mini.lua
Normal 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)
|
||||
@@ -5,8 +5,8 @@ local lspkind = require("lspkind")
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
},
|
||||
@@ -15,6 +15,10 @@ cmp.setup({
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<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" },
|
||||
|
||||
@@ -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"})
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
local telescope = require("telescope")
|
||||
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()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
||||
end, { desc = "Find string under cursor in cwd" })
|
||||
|
||||
@@ -11,4 +11,19 @@ if not vim.loop.fs_stat(lazypath) then
|
||||
end
|
||||
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");
|
||||
|
||||
8
lua/absolute/plugins/bufferline.lua
Normal file
8
lua/absolute/plugins/bufferline.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
version = "*",
|
||||
config = function()
|
||||
require("absolute.after.bufferline")
|
||||
end
|
||||
}
|
||||
5
lua/absolute/plugins/comment.lua
Normal file
5
lua/absolute/plugins/comment.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = true
|
||||
}
|
||||
4
lua/absolute/plugins/dressing.lua
Normal file
4
lua/absolute/plugins/dressing.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"stevearc/dressing.nvim",
|
||||
event = "VeryLazy"
|
||||
}
|
||||
11
lua/absolute/plugins/lsp-config.lua
Normal file
11
lua/absolute/plugins/lsp-config.lua
Normal 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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
7
lua/absolute/plugins/lualine.lua
Normal file
7
lua/absolute/plugins/lualine.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require("absolute.after.lualine")
|
||||
end
|
||||
}
|
||||
10
lua/absolute/plugins/mason.lua
Normal file
10
lua/absolute/plugins/mason.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
'williamboman/mason.nvim',
|
||||
dependencies = {
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
},
|
||||
config = function()
|
||||
require("absolute.after.mason")
|
||||
end
|
||||
|
||||
}
|
||||
7
lua/absolute/plugins/mini.lua
Normal file
7
lua/absolute/plugins/mini.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"echasnovski/mini.nvim",
|
||||
version = "*", -- Stable Version
|
||||
config = function()
|
||||
require("absolute.after.mini")
|
||||
end
|
||||
}
|
||||
5
lua/absolute/plugins/nightfly.lua
Normal file
5
lua/absolute/plugins/nightfly.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"bluz71/vim-nightfly-colors",
|
||||
name = "nightfly",
|
||||
lazy = false,
|
||||
}
|
||||
@@ -4,14 +4,15 @@ return {
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer', --source for text in buffer
|
||||
'hrsh7th/cmp-path', --source for file system paths
|
||||
'hrsh7th/cmp-cmdline',
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"saadparwaiz1/cmp_luasnip", --source for autocompletion
|
||||
"onsails/lspkind.nvim",
|
||||
"L3MON4D3/LuaSnip", --Snippet Engine
|
||||
"rafamadriz/friendly-snippets", --Useful snippets
|
||||
},
|
||||
config = function()
|
||||
require("absolute.after.nvim-cmp")
|
||||
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
return {
|
||||
"nvim-treesitter/playground",
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
return {
|
||||
'rose-pine/neovim',
|
||||
name = 'rose-pine',
|
||||
config = function()
|
||||
require("absolute.after.rose-pine")
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim'},
|
||||
requires = {
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make"
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-dap.nvim"
|
||||
}
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-dap.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("absolute.after.telescope")
|
||||
|
||||
3
lua/absolute/plugins/vim-maximizer.lua
Normal file
3
lua/absolute/plugins/vim-maximizer.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"szw/vim-maximizer"
|
||||
}
|
||||
@@ -8,10 +8,10 @@ return {
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
{ "<C-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<C-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<C-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<C-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<C-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,18 +18,33 @@ vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||
|
||||
|
||||
-- Alternate Escape (Easy to Reach)
|
||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||
|
||||
|
||||
-- Disable Q - Nothing Good Ever Happens
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
|
||||
-- Format document with LSP Formatter
|
||||
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-j>", "<cmd>cprev<CR>zz")
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lnext<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>]])
|
||||
|
||||
|
||||
-- Source File Keymap
|
||||
vim.keymap.set("n", "<leader><leader>", function()
|
||||
vim.cmd("so")
|
||||
end)
|
||||
|
||||
-- Manage VIM Maximizer
|
||||
vim.keymap.set("n", "<leader>sm", "<cmd>MaximizerToggle<CR>")
|
||||
|
||||
Reference in New Issue
Block a user