making some quality of life changes
This commit is contained in:
parent
3d9da01eb7
commit
d4a07a465c
38
init.lua
38
init.lua
|
@ -86,25 +86,12 @@ vim.opt.rtp:prepend(lazypath)
|
|||
--
|
||||
-- You can press `?` in this menu for help. Use `:q` to close the window
|
||||
--
|
||||
-- To update plugins, you can run
|
||||
-- :Lazy update
|
||||
--
|
||||
-- NOTE: Here is where you install your plugins.
|
||||
require('lazy').setup {
|
||||
{ import = 'Judokasarin.plugins' },
|
||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
'tpope/vim-sleuth',
|
||||
|
||||
-- NOTE: Plugins can also be added by using a table,
|
||||
-- with the first argument being the link and the following
|
||||
-- keys can be used to configure plugin behavior/loading/etc.
|
||||
--
|
||||
-- Use `opts = {}` to force a plugin to be loaded.
|
||||
--
|
||||
-- This is equivalent to:
|
||||
-- require('Comment').setup({})
|
||||
|
||||
-- "gc" to comment visual regions/lines
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
|
||||
-- Here is a more advanced example where we pass configuration
|
||||
|
@ -133,29 +120,6 @@ require('lazy').setup {
|
|||
-- For example, in the following configuration, we use:
|
||||
-- event = 'VeryLazy'
|
||||
--
|
||||
-- which loads which-key after all the UI elements are loaded. Events can be
|
||||
-- normal autocommands events (`:help autocmd-events`).
|
||||
--
|
||||
-- Then, because we use the `config` key, the configuration only runs
|
||||
-- after the plugin has been loaded:
|
||||
-- config = function() ... end
|
||||
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
|
||||
config = function() -- This is the function that runs, AFTER loading
|
||||
require('which-key').setup()
|
||||
|
||||
-- Document existing key chains
|
||||
require('which-key').register {
|
||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- NOTE: Plugins can specify dependencies.
|
||||
--
|
||||
|
|
|
@ -3,7 +3,6 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
|
@ -28,7 +27,16 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
|
|||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
--
|
||||
--
|
||||
-- [[ Neo-Tree ]]
|
||||
vim.keymap.set('n', '<leader>ee', '<Cmd>Neotree toggle show reveal_force_cwd<cr>', { desc = '[e]xplorer' })
|
||||
vim.keymap.set('n', '<leader>eg', '<Cmd>Neotree toggle show git_status<cr>', { desc = '[e]xplorer [g]it status' })
|
||||
vim.keymap.set('n', '<leader>eb', '<Cmd>Neotree toggle show buffers<cr>', { desc = '[e]xplorer [b]uffers' })
|
||||
vim.keymap.set('n', '<leader>ec', '<Cmd>Neotree close<cr>', { desc = '[e]xplorer [b]uffers' })
|
||||
--
|
||||
--
|
||||
--
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
|
@ -42,4 +50,3 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
-- return {
|
||||
-- 'akinsho/bufferline.nvim',
|
||||
-- version = "*",
|
||||
-- dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- mode = "buffers",
|
||||
-- separator_style = "slant",
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
return {
|
||||
-- 'akinsho/bufferline.nvim',
|
||||
-- version = "*",
|
||||
-- dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- mode = "buffers",
|
||||
-- separator_style = "slant",
|
||||
-- }
|
||||
-- }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
-- Here is a more advanced example where we pass configuration
|
||||
-- options to `gitsigns.nvim`. This is equivalent to the following lua:
|
||||
-- require('gitsigns').setup({ ... })
|
||||
--
|
||||
-- See `:help gitsigns` to understand what the configuration keys do
|
||||
return { -- 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 = '~' },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
return
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||
|
||||
-- Only one of these is needed, not both.
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
},
|
||||
config = true
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
}
|
||||
}
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
|||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
||||
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
|
||||
-- `build` is used to run some command when the plugin is installed/updated.
|
||||
|
@ -66,9 +66,11 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
|||
-- Enable telescope extensions, if they are installed
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
|
||||
-- [[Telescope Keymaps]]
|
||||
--
|
||||
-- -- See `:help telescope.builtin`
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
|
@ -102,5 +104,7 @@ return { -- Fuzzy Finder (files, lsp, etc)
|
|||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
|
||||
--
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
return { -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VeryLazy', -- Sets the loading event to 'VeryLazy'
|
||||
config = function() -- This is the function that runs, AFTER loading
|
||||
require('which-key').setup()
|
||||
|
||||
-- Document existing key chains
|
||||
require('which-key').register {
|
||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
['<C-e>'] = { name = '[E]xplorer', _ = 'which_key_ignore' },
|
||||
}
|
||||
end,
|
||||
}
|
Loading…
Reference in New Issue