adds oil, blame, lazygit, and minimap
This commit is contained in:
parent
2ba39c6973
commit
6d8dc4e2de
6 changed files with 275 additions and 51 deletions
151
init.lua
151
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'
|
||||
|
|
@ -616,7 +616,10 @@ require('lazy').setup({
|
|||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
pyright = {},
|
||||
ruff = {},
|
||||
debugpy = {},
|
||||
taplo = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
|
@ -709,7 +712,7 @@ require('lazy').setup({
|
|||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
python = { 'ruff_format', 'isort', 'black', stop_after_first = true },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
|
|
@ -773,24 +776,24 @@ require('lazy').setup({
|
|||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
-- Select the [n]ext item
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- ['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Select the [p]revious item
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
-- ['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Scroll the documentation window [b]ack / [f]orward
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
|
||||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
|
|
@ -829,6 +832,12 @@ require('lazy').setup({
|
|||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
cmp.setup.filetype({ 'sql' }, {
|
||||
sources = {
|
||||
{ name = 'vim-dadbod-completion' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
}),
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
|
@ -838,13 +847,16 @@ require('lazy').setup({
|
|||
-- 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`.
|
||||
'folke/tokyonight.nvim',
|
||||
-- 'folke/tokyonight.nvim',
|
||||
'rose-pine/neovim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
-- vim.cmd.colorscheme 'tokyonight-night'
|
||||
-- vim.cmd.colorscheme 'rose-pine'
|
||||
vim.cmd.colorscheme 'retrobox'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
|
|
@ -854,50 +866,68 @@ require('lazy').setup({
|
|||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
||||
{ -- Collection of various small independent plugins/modules
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
-- { -- Collection of various small independent plugins/modules
|
||||
-- 'echasnovski/mini.nvim',
|
||||
-- config = function()
|
||||
-- -- Better Around/Inside textobjects
|
||||
-- --
|
||||
-- -- Examples:
|
||||
-- -- - va) - [V]isually select [A]round [)]paren
|
||||
-- -- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- -- - ci' - [C]hange [I]nside [']quote
|
||||
-- require('mini.ai').setup { n_lines = 500 }
|
||||
--
|
||||
-- -- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
-- --
|
||||
-- -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- -- - sd' - [S]urround [D]elete [']quotes
|
||||
-- -- - sr)' - [S]urround [R]eplace [)] [']
|
||||
-- require('mini.surround').setup()
|
||||
--
|
||||
-- -- Simple and easy statusline.
|
||||
-- -- You could remove this setup call if you don't like it,
|
||||
-- -- and try some other statusline plugin
|
||||
-- local statusline = require 'mini.statusline'
|
||||
-- -- set use_icons to true if you have a Nerd Font
|
||||
-- statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
--
|
||||
-- -- You can configure sections in the statusline by overriding their
|
||||
-- -- default behavior. For example, here we set the section for
|
||||
-- -- cursor location to LINE:COLUMN
|
||||
-- ---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return '%2l:%-2v'
|
||||
-- end
|
||||
--
|
||||
-- -- ... and there is more!
|
||||
-- -- Check out: https://github.com/echasnovski/mini.nvim
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require('mini.surround').setup()
|
||||
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
local statusline = require 'mini.statusline'
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
statusline.section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
end,
|
||||
},
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
opts = {
|
||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c',
|
||||
'diff',
|
||||
'html',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'query',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'python',
|
||||
'markdown_inline',
|
||||
'markdown',
|
||||
'rst',
|
||||
'ninja',
|
||||
},
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
|
@ -937,7 +967,7 @@ require('lazy').setup({
|
|||
-- This is the easiest way to modularize your config.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
--
|
||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||
-- Or use telescope!
|
||||
|
|
@ -965,5 +995,24 @@ require('lazy').setup({
|
|||
},
|
||||
})
|
||||
|
||||
-- MiniMap = require 'mini.map'
|
||||
-- vim.keymap.set('n', '<leader>mt', MiniMap.toggle, { desc = 'Toggle MiniMap' })
|
||||
-- vim.keymap.set('n', '<leader>mo', MiniMap.open, { desc = 'Open MiniMap' })
|
||||
-- vim.keymap.set('n', '<leader>mc', MiniMap.close, { desc = 'Close MiniMap' })
|
||||
-- vim.keymap.set('n', '<leader>mf', MiniMap.toggle_focus, { desc = 'Toggle MiniMap Focus' })
|
||||
-- vim.keymap.set('n', '<leader>mr', MiniMap.refresh, { desc = 'Refresh MiniMap' })
|
||||
-- vim.keymap.set('n', '<leader>ms', MiniMap.toggle_side, { desc = 'Toggle MiniMap side' })
|
||||
--
|
||||
vim.api.nvim_create_user_command('LintProject', function()
|
||||
vim.cmd '!poetry run task lint'
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('FormatProject', function()
|
||||
vim.cmd '!poetry run task format'
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command('ShowDiagnostic', function()
|
||||
vim.cmd '!lua vim.diagnostic.open_float()'
|
||||
end, {})
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue