Basic setup
This commit is contained in:
parent
2ba39c6973
commit
0185a988a2
116
init.lua
116
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- 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!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
@ -243,18 +243,18 @@ require('lazy').setup({
|
||||||
-- require('gitsigns').setup({ ... })
|
-- require('gitsigns').setup({ ... })
|
||||||
--
|
--
|
||||||
-- See `:help gitsigns` to understand what the configuration keys do
|
-- See `:help gitsigns` to understand what the configuration keys do
|
||||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
-- 'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
-- opts = {
|
||||||
signs = {
|
-- signs = {
|
||||||
add = { text = '+' },
|
-- add = { text = '+' },
|
||||||
change = { text = '~' },
|
-- change = { text = '~' },
|
||||||
delete = { text = '_' },
|
-- delete = { text = '_' },
|
||||||
topdelete = { text = '‾' },
|
-- topdelete = { text = '‾' },
|
||||||
changedelete = { text = '~' },
|
-- changedelete = { text = '~' },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
|
|
||||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
||||||
--
|
--
|
||||||
|
@ -615,7 +615,40 @@ require('lazy').setup({
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = {
|
||||||
|
-- gofumpt = true,
|
||||||
|
-- codelenses = {
|
||||||
|
-- gc_details = false,
|
||||||
|
-- generate = true,
|
||||||
|
-- regenerate_cgo = true,
|
||||||
|
-- run_govulncheck = true,
|
||||||
|
-- test = true,
|
||||||
|
-- tidy = true,
|
||||||
|
-- upgrade_dependency = true,
|
||||||
|
-- vendor = true,
|
||||||
|
-- },
|
||||||
|
-- hints = {
|
||||||
|
-- assignVariableTypes = true,
|
||||||
|
-- compositeLiteralFields = true,
|
||||||
|
-- compositeLiteralTypes = true,
|
||||||
|
-- constantValues = true,
|
||||||
|
-- functionTypeParameters = true,
|
||||||
|
-- parameterNames = true,
|
||||||
|
-- rangeVariableTypes = true,
|
||||||
|
-- },
|
||||||
|
-- analyses = {
|
||||||
|
-- fieldalignment = true,
|
||||||
|
-- nilness = true,
|
||||||
|
-- unusedparams = true,
|
||||||
|
-- unusedwrite = true,
|
||||||
|
-- useany = true,
|
||||||
|
-- },
|
||||||
|
-- usePlaceholders = true,
|
||||||
|
-- completeUnimported = true,
|
||||||
|
-- staticcheck = true,
|
||||||
|
-- directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' },
|
||||||
|
-- semanticTokens = true,
|
||||||
|
},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
@ -656,6 +689,12 @@ require('lazy').setup({
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'stylua', -- Used to format Lua code
|
'stylua', -- Used to format Lua code
|
||||||
|
'prettierd',
|
||||||
|
'goimports',
|
||||||
|
'gofumpt',
|
||||||
|
'gomodifytags',
|
||||||
|
'impl',
|
||||||
|
'delve',
|
||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
@ -708,6 +747,8 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
|
yaml = { 'prettierd' },
|
||||||
|
go = { 'goimports', 'gofumpt' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
|
@ -737,12 +778,12 @@ require('lazy').setup({
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
-- {
|
{
|
||||||
-- 'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
-- config = function()
|
config = function()
|
||||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
-- end,
|
end,
|
||||||
-- },
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
@ -825,6 +866,7 @@ require('lazy').setup({
|
||||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
||||||
group_index = 0,
|
group_index = 0,
|
||||||
},
|
},
|
||||||
|
{ name = 'copilot' },
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
|
@ -838,13 +880,14 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'catppuccin/nvim',
|
||||||
|
name = 'catppuccin',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
init = function()
|
init = function()
|
||||||
-- Load the colorscheme here.
|
-- Load the colorscheme here.
|
||||||
-- Like many other themes, this one has different styles, and you could load
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
vim.cmd.colorscheme 'catppuccin-mocha'
|
||||||
|
|
||||||
-- You can configure highlights by doing something like:
|
-- You can configure highlights by doing something like:
|
||||||
vim.cmd.hi 'Comment gui=none'
|
vim.cmd.hi 'Comment gui=none'
|
||||||
|
@ -897,7 +940,24 @@ require('lazy').setup({
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
ensure_installed = {
|
||||||
|
'bash',
|
||||||
|
'c',
|
||||||
|
'diff',
|
||||||
|
'go',
|
||||||
|
'gomod',
|
||||||
|
'gowork',
|
||||||
|
'gosum',
|
||||||
|
'html',
|
||||||
|
'lua',
|
||||||
|
'luadoc',
|
||||||
|
'markdown',
|
||||||
|
'markdown_inline',
|
||||||
|
'query',
|
||||||
|
'yaml',
|
||||||
|
'vim',
|
||||||
|
'vimdoc',
|
||||||
|
},
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -926,12 +986,12 @@ require('lazy').setup({
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- 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).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
-- require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
-- require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
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`
|
-- 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.
|
-- This is the easiest way to modularize your config.
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'goolord/alpha-nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
enabled = true,
|
||||||
|
init = false,
|
||||||
|
dependencies = {
|
||||||
|
'echasnovski/mini.icons',
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local alpha = require 'alpha'
|
||||||
|
local dashboard = require 'alpha.themes.dashboard'
|
||||||
|
|
||||||
|
dashboard.section.buttons.val = {
|
||||||
|
dashboard.button('e', ' New file', '<cmd>ene <CR>'),
|
||||||
|
dashboard.button('f', ' Find file', '<cmd>Telescope find_files<cr>'),
|
||||||
|
dashboard.button('h', ' Recently opened files', '<cmd>Telescope oldfiles<cr>'),
|
||||||
|
-- dashboard.button('SPC f r', ' Frecency/MRU'),
|
||||||
|
dashboard.button('g', ' Find word', '<cmd>Telescope live_grep<cr>'),
|
||||||
|
-- dashboard.button('<leader> fm', ' Jump to bookmarks'),
|
||||||
|
dashboard.button('s', ' Open last session', '<cmd> lua require("persistence").load() <cr>'),
|
||||||
|
dashboard.button('sl', ' Select Session', '<cmd> lua require("persistence").select() <cr>'),
|
||||||
|
dashboard.button('u', ' Update plugins', '<cmd>Lazy sync<CR>'),
|
||||||
|
dashboard.button('c', ' Configuration', "<cmd>lua require('telescope.builtin').find_files { cwd = vim.fn.stdpath 'config' } <cr>"),
|
||||||
|
dashboard.button('q', ' Quit', '<cmd>qa<CR>'),
|
||||||
|
}
|
||||||
|
alpha.setup(dashboard.config)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
local on_attach = function(on_attach, name)
|
||||||
|
return vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
callback = function(args)
|
||||||
|
local buffer = args.buf ---@type number
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
if client and (not name or client.name == name) then
|
||||||
|
return on_attach(client, buffer)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'zbirenbaum/copilot.lua',
|
||||||
|
cmd = 'Copilot',
|
||||||
|
-- new
|
||||||
|
-- event = 'InsertEnter',
|
||||||
|
build = ':Copilot auth',
|
||||||
|
opts = {
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
filetypes = {
|
||||||
|
markdown = true,
|
||||||
|
help = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'zbirenbaum/copilot-cmp',
|
||||||
|
dependencies = 'copilot.lua',
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
local copilot_cmp = require 'copilot_cmp'
|
||||||
|
copilot_cmp.setup(opts)
|
||||||
|
on_attach(function(client)
|
||||||
|
copilot_cmp._on_insert_enter {}
|
||||||
|
end, 'copilot')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'olimorris/codecompanion.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'hrsh7th/nvim-cmp', -- Optional: For using slash commands and variables in the chat buffer
|
||||||
|
'nvim-telescope/telescope.nvim', -- Optional: For using slash commands
|
||||||
|
{ 'stevearc/dressing.nvim', opts = {} }, -- Optional: Improves `vim.ui.select`
|
||||||
|
},
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'CopilotC-Nvim/CopilotChat.nvim',
|
||||||
|
branch = 'canary',
|
||||||
|
dependencies = {
|
||||||
|
{ 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
|
||||||
|
{ 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
|
||||||
|
},
|
||||||
|
build = 'make tiktoken', -- Only on MacOS or Linux
|
||||||
|
opts = {
|
||||||
|
debug = true, -- Enable debugging
|
||||||
|
context = 'buffer',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>aa',
|
||||||
|
function()
|
||||||
|
local chat = require 'CopilotChat'
|
||||||
|
chat.toggle()
|
||||||
|
end,
|
||||||
|
desc = 'Copilot toggle chat',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>aq',
|
||||||
|
function()
|
||||||
|
local input = vim.fn.input 'Quick Chat: '
|
||||||
|
if input ~= '' then
|
||||||
|
require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = 'Copilot quick chat',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>ax',
|
||||||
|
function()
|
||||||
|
local chat = require 'CopilotChat'
|
||||||
|
chat.reset()
|
||||||
|
end,
|
||||||
|
desc = 'Copilot chat reset',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>ap',
|
||||||
|
function()
|
||||||
|
local actions = require 'CopilotChat.actions'
|
||||||
|
require('CopilotChat.integrations.telescope').pick(actions.prompt_actions())
|
||||||
|
end,
|
||||||
|
desc = 'Copilot chat prompt actions',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
if not client.server_capabilities.semanticTokensProvider then
|
||||||
|
local semantic = client.config.capabilities.textDocument.semanticTokens
|
||||||
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
|
full = true,
|
||||||
|
legend = {
|
||||||
|
tokenTypes = semantic.tokenTypes,
|
||||||
|
tokenModifiers = semantic.tokenModifiers,
|
||||||
|
},
|
||||||
|
range = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require('lspconfig').gopls.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'fredrikaverpil/neotest-golang',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'echasnovski/mini.icons',
|
||||||
|
opts = {
|
||||||
|
file = {
|
||||||
|
['.go-version'] = { glyph = '', hl = 'MiniIconsBlue' },
|
||||||
|
},
|
||||||
|
filetype = {
|
||||||
|
gotmpl = { glyph = '', hl = 'MiniIconsGrey' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
optional = true,
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-neotest/neotest',
|
||||||
|
optional = true,
|
||||||
|
dependencies = {
|
||||||
|
'fredrikaverpil/neotest-golang',
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
adapters = {
|
||||||
|
['neotest-golang'] = {
|
||||||
|
-- Here we can set options for neotest-golang, e.g.
|
||||||
|
-- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" },
|
||||||
|
dap_go_enabled = true, -- requires leoluz/nvim-dap-go
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
return {
|
||||||
|
'MagicDuck/grug-far.nvim',
|
||||||
|
opts = { headerMaxWidth = 80 },
|
||||||
|
cmd = 'GrugFar',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>sR',
|
||||||
|
function()
|
||||||
|
local grug = require 'grug-far'
|
||||||
|
local ext = vim.bo.buftype == '' and vim.fn.expand '%:e'
|
||||||
|
grug.open {
|
||||||
|
transient = true,
|
||||||
|
prefills = {
|
||||||
|
filesFilter = ext and ext ~= '' and '*.' .. ext or nil,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mode = { 'n', 'v' },
|
||||||
|
desc = 'Search and Replace',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -2,4 +2,11 @@
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
|
vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' }, { command = 'checktime' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<A-h>', '<C-w>5<', { desc = 'Decrease window width' })
|
||||||
|
vim.keymap.set('n', '<A-l>', '<C-w>5>', { desc = 'Increase window width' })
|
||||||
|
vim.keymap.set('n', '<A-j>', '<C-w>1+', { desc = 'Increase window height' })
|
||||||
|
vim.keymap.set('n', '<A-k>', '<C-w>1-', { desc = 'Decrease window height' })
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
return {
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
lazy = true,
|
||||||
|
cmd = {
|
||||||
|
'LazyGit',
|
||||||
|
'LazyGitConfig',
|
||||||
|
'LazyGitCurrentFile',
|
||||||
|
'LazyGitFilter',
|
||||||
|
'LazyGitFilterCurrentFile',
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Lazygit (Root Dir)' },
|
||||||
|
{ '<leader>gf', '<cmd>LazyGitFilterCurrentFile<cr>', desc = 'Lazygit Current File History' },
|
||||||
|
{ '<leader>gl', '<cmd>LazyGitFilter<cr>', desc = 'Lazygit log' },
|
||||||
|
{ '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Git blame' },
|
||||||
|
{ '<leader>gs', '<cmd>Telescope git_status<CR>', desc = 'Git Status' },
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
'chentoast/marks.nvim',
|
||||||
|
event = 'VeryLazy',
|
||||||
|
opts = {},
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
return {
|
||||||
|
'stevearc/oil.nvim',
|
||||||
|
---@module 'oil'
|
||||||
|
---@type oil.SetupOpts
|
||||||
|
opts = {},
|
||||||
|
dependencies = {
|
||||||
|
{ 'echasnovski/mini.icons', opts = {} },
|
||||||
|
{ 'nvim-tree/nvim-web-devicons', opts = {} },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('oil').setup {
|
||||||
|
keymaps = {
|
||||||
|
['<Esc>'] = 'actions.close',
|
||||||
|
['<C-h>'] = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
-- { '=', '<cmd>Oil<cr>', mode = 'n', desc = 'Open Filesystem' },
|
||||||
|
{ '-', '<cmd>Oil --float<cr>', mode = 'n', desc = 'Open Floating Filesystem' },
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'folke/persistence.nvim',
|
||||||
|
event = 'BufReadPre',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
'christoomey/vim-tmux-navigator',
|
||||||
|
cmd = {
|
||||||
|
'TmuxNavigateLeft',
|
||||||
|
'TmuxNavigateDown',
|
||||||
|
'TmuxNavigateUp',
|
||||||
|
'TmuxNavigateRight',
|
||||||
|
'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>' },
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
return {
|
||||||
|
'vim-test/vim-test',
|
||||||
|
dependencies = {
|
||||||
|
'preservim/vimux',
|
||||||
|
},
|
||||||
|
setup = {
|
||||||
|
vim.cmd 'let test#strategy = "vimux"',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>tt', '<cmd>TestFile<CR>', { desc = 'Test file' } },
|
||||||
|
{ '<leader>tn', '<cmd>TestNearest<CR>', { desc = 'Test nearest' } },
|
||||||
|
{ '<leader>tl', '<cmd>TestLast<CR>', { desc = 'Test last' } },
|
||||||
|
},
|
||||||
|
}
|
|
@ -90,16 +90,16 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Change breakpoint icons
|
-- Change breakpoint icons
|
||||||
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
||||||
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
|
vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
|
||||||
-- local breakpoint_icons = vim.g.have_nerd_font
|
local breakpoint_icons = vim.g.have_nerd_font
|
||||||
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
|
and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
|
||||||
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
|
or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
|
||||||
-- for type, icon in pairs(breakpoint_icons) do
|
for type, icon in pairs(breakpoint_icons) do
|
||||||
-- local tp = 'Dap' .. type
|
local tp = 'Dap' .. type
|
||||||
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
|
local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
|
||||||
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
|
||||||
-- end
|
end
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
|
|
|
@ -6,6 +6,7 @@ return {
|
||||||
{
|
{
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
|
current_line_blame = true,
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
local gitsigns = require 'gitsigns'
|
local gitsigns = require 'gitsigns'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue