added plugins
This commit is contained in:
parent
e947649cb0
commit
d3241a38c6
238
init.lua
238
init.lua
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
@ -290,6 +290,233 @@ require('lazy').setup({
|
|||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
||||
|
||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- themery
|
||||
{
|
||||
'zaldih/themery.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('themery').setup {
|
||||
themes = { 'visual_studio_code', 'retrobox' },
|
||||
livePreview = true,
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- vscode theme
|
||||
{
|
||||
'askfiy/visual_studio_code',
|
||||
priority = 100,
|
||||
config = function()
|
||||
vim.cmd [[colorscheme visual_studio_code]]
|
||||
end,
|
||||
},
|
||||
|
||||
-- transparent windows
|
||||
{ 'xiyaowong/transparent.nvim' },
|
||||
|
||||
-- git-conflict
|
||||
{ 'akinsho/git-conflict.nvim', version = '*', config = true },
|
||||
|
||||
-- git blame
|
||||
{
|
||||
'f-person/git-blame.nvim',
|
||||
},
|
||||
|
||||
-- neogit
|
||||
{
|
||||
'NeogitOrg/neogit',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim', -- required
|
||||
'sindrets/diffview.nvim', -- optional - Diff integration
|
||||
|
||||
-- Only one of these is needed.
|
||||
'nvim-telescope/telescope.nvim', -- optional
|
||||
-- 'ibhagwan/fzf-lua', -- optional
|
||||
-- 'echasnovski/mini.pick', -- optional
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- status line
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {},
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- indention markers
|
||||
{
|
||||
'kiyoon/treesitter-indent-object.nvim',
|
||||
keys = {
|
||||
{
|
||||
'ai',
|
||||
function()
|
||||
require('treesitter_indent_object.textobj').select_indent_outer()
|
||||
end,
|
||||
mode = { 'x', 'o' },
|
||||
desc = 'Select context-aware indent (outer)',
|
||||
},
|
||||
{
|
||||
'aI',
|
||||
function()
|
||||
require('treesitter_indent_object.textobj').select_indent_outer(true)
|
||||
end,
|
||||
mode = { 'x', 'o' },
|
||||
desc = 'Select context-aware indent (outer, line-wise)',
|
||||
},
|
||||
{
|
||||
'ii',
|
||||
function()
|
||||
require('treesitter_indent_object.textobj').select_indent_inner()
|
||||
end,
|
||||
mode = { 'x', 'o' },
|
||||
desc = 'Select context-aware indent (inner, partial range)',
|
||||
},
|
||||
{
|
||||
'iI',
|
||||
function()
|
||||
require('treesitter_indent_object.textobj').select_indent_inner(true, 'V')
|
||||
end,
|
||||
mode = { 'x', 'o' },
|
||||
desc = 'Select context-aware indent (inner, entire range) in line-wise visual mode',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
tag = 'v2.20.8', -- Use v2
|
||||
event = 'BufReadPost',
|
||||
config = function()
|
||||
vim.opt.list = true
|
||||
require('indent_blankline').setup {
|
||||
space_char_blankline = ' ',
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- dap
|
||||
{
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
'leoluz/nvim-dap-go',
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
'nvim-neotest/nvim-nio',
|
||||
'williamboman/mason.nvim',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local ui = require 'dapui'
|
||||
|
||||
require('dapui').setup()
|
||||
require('dap-go').setup()
|
||||
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = '${port}',
|
||||
executable = {
|
||||
command = 'codelldb',
|
||||
args = { '--port', '${port}' },
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.zig = {
|
||||
{
|
||||
type = 'codelldb',
|
||||
name = 'Launch',
|
||||
request = 'launch',
|
||||
program = '${workspaceFolder}/zig-out/bin/${workspaceFolderBasename}',
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<space>b', dap.toggle_breakpoint)
|
||||
vim.keymap.set('n', '<space>gb', dap.run_to_cursor)
|
||||
|
||||
-- Eval var under cursor
|
||||
vim.keymap.set('n', '<space>?', function()
|
||||
require('dapui').eval(nil, { enter = true })
|
||||
end)
|
||||
vim.keymap.set('n', '<F1>', dap.continue)
|
||||
vim.keymap.set('n', '<F2>', dap.step_into)
|
||||
vim.keymap.set('n', '<F3>', dap.step_over)
|
||||
vim.keymap.set('n', '<F4>', dap.step_out)
|
||||
vim.keymap.set('n', '<F5>', dap.step_back)
|
||||
vim.keymap.set('n', '<F12>', dap.restart)
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
|
@ -990,12 +1217,11 @@ require('lazy').setup({
|
|||
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- require 'kickstart.plugins.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.indent_line',
|
||||
require 'kickstart.plugins.lint',
|
||||
require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
|
|
Loading…
Reference in New Issue