Quality of life features added
This commit is contained in:
1
nvim_packer/after/plugin/blame.lua
Normal file
1
nvim_packer/after/plugin/blame.lua
Normal file
@@ -0,0 +1 @@
|
||||
require('blame').setup{}
|
||||
1
nvim_packer/after/plugin/bufferline.lua
Normal file
1
nvim_packer/after/plugin/bufferline.lua
Normal file
@@ -0,0 +1 @@
|
||||
require("bufferline").setup{}
|
||||
5
nvim_packer/after/plugin/catppuccin.lua
Normal file
5
nvim_packer/after/plugin/catppuccin.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
2
nvim_packer/after/plugin/fugitive.lua
Normal file
2
nvim_packer/after/plugin/fugitive.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
|
||||
|
||||
26
nvim_packer/after/plugin/indentblankline.lua
Normal file
26
nvim_packer/after/plugin/indentblankline.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local highlight = {
|
||||
"RainbowRed",
|
||||
"RainbowYellow",
|
||||
"RainbowBlue",
|
||||
"RainbowOrange",
|
||||
"RainbowGreen",
|
||||
"RainbowViolet",
|
||||
"RainbowCyan",
|
||||
}
|
||||
local hooks = require "ibl.hooks"
|
||||
-- create the highlight groups in the highlight setup hook, so they are reset
|
||||
-- every time the colorscheme changes
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||
end)
|
||||
|
||||
vim.g.rainbow_delimiters = { highlight = highlight }
|
||||
require("ibl").setup { scope = { highlight = highlight } }
|
||||
|
||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||
45
nvim_packer/after/plugin/lsp.lua
Normal file
45
nvim_packer/after/plugin/lsp.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
local opts = {buffer = bufnr, remap = false}
|
||||
|
||||
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set("n", "<leader>rn", function() vim.lsp.buf.rename() end, opts)
|
||||
|
||||
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>ws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||
end)
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {'tsserver', 'tailwindcss', 'cssls', 'clangd', 'pyright' },
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
lua_ls = function()
|
||||
local lua_opts = lsp_zero.nvim_lua_ls()
|
||||
require('lspconfig').lua_ls.setup(lua_opts)
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
local cmp = require('cmp')
|
||||
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'path'},
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'nvim_lua'},
|
||||
},
|
||||
formatting = lsp_zero.cmp_format(),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<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(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
}),
|
||||
})
|
||||
14
nvim_packer/after/plugin/lualine.lua
Normal file
14
nvim_packer/after/plugin/lualine.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'onedark',
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'filename',
|
||||
path = 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
13
nvim_packer/after/plugin/telescope.lua
Normal file
13
nvim_packer/after/plugin/telescope.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
file_ignore_patterns = { ".git/", "node_modules" },
|
||||
layout_strategy = 'horizontal',
|
||||
prompt_prefix = '🔭 ',
|
||||
selection_caret = ' ',
|
||||
initial_mode = 'insert',
|
||||
},
|
||||
})
|
||||
vim.keymap.set('n', '<leader>f', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||
9
nvim_packer/after/plugin/tmuxnavigator.lua
Normal file
9
nvim_packer/after/plugin/tmuxnavigator.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require('nvim-tmux-navigation').setup {
|
||||
keybindings = {
|
||||
left = "<C-h>",
|
||||
down = "<C-j>",
|
||||
up = "<C-k>",
|
||||
right = "<C-l>",
|
||||
next = "<C-Space>",
|
||||
}
|
||||
}
|
||||
13
nvim_packer/after/plugin/treesitter.lua
Normal file
13
nvim_packer/after/plugin/treesitter.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "cpp", "typescript", "c", "python" },
|
||||
|
||||
sync_install = false,
|
||||
|
||||
auto_install = true,
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user