oil updates, telescope config mapping

This commit is contained in:
Alexander Muszynski
2024-07-18 17:10:15 -04:00
parent b0d41c383f
commit ad8e634d1a
4 changed files with 24 additions and 21 deletions
+21 -3
View File
@@ -290,6 +290,7 @@ require('lazy').setup({
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, ['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, ['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
['<leader>g'] = { name = '[G]it Search', _ = 'which_key_ignore' },
} }
-- visual mode -- visual mode
require('which-key').register({ require('which-key').register({
@@ -380,10 +381,15 @@ require('lazy').setup({
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>gs', '<CMD>:Telescope git_status initial_mode=normal<CR>', { desc = '[G]it [S]tatus' })
vim.keymap.set('n', '<leader>gt', '<CMD>:Telescope git_stash initial_mode=normal<CR>', { desc = '[G]it s[T]ash' })
vim.keymap.set('n', '<leader>gc', builtin.git_commits, { desc = '[G]it [C]ommits' })
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>st', builtin.treesitter, { desc = '[S]earch [T]reesitter' })
vim.keymap.set('n', '<leader>th', builtin.colorscheme, { desc = '[TH]eme Picker' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', '<leader><leader>', '<CMD>:Telescope buffers initial_mode=normal<CR>', { desc = '[ ] Find existing buffers' })
-- Slightly advanced example of overriding default behavior and theme -- Slightly advanced example of overriding default behavior and theme
vim.keymap.set('n', '<leader>/', function() vim.keymap.set('n', '<leader>/', function()
@@ -609,7 +615,6 @@ 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, {
-- Lua -- Lua
'lua-language-server',
'stylua', 'stylua',
-- TS / JS -- TS / JS
'html-lsp', 'html-lsp',
@@ -618,7 +623,6 @@ require('lazy').setup({
'prettierd', 'prettierd',
'typescript-language-server', 'typescript-language-server',
-- Python -- Python
'ruff-lsp',
'ruff', 'ruff',
'pyright', 'pyright',
-- C -- C
@@ -800,6 +804,17 @@ require('lazy').setup({
-- --
-- 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', 'folke/tokyonight.nvim',
opts = { transparent_background = true },
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'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
end,
priority = 1000,
}, },
-- Highlight todo, notes, etc in comments -- Highlight todo, notes, etc in comments
@@ -858,6 +873,9 @@ require('lazy').setup({
'vimdoc', 'vimdoc',
'css', 'css',
'python', 'python',
'go',
'rust',
'javascript',
'typescript', 'typescript',
'graphql', 'graphql',
}, },
+1 -17
View File
@@ -2,20 +2,4 @@
-- 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
return { return {}
{
'catppuccin/nvim',
name = 'catppuccin',
opts = { transparent_background = true },
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 'catppuccin'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
end,
priority = 1000,
},
}
+1
View File
@@ -0,0 +1 @@
return {}
+1 -1
View File
@@ -63,10 +63,10 @@ local opt = {
['t'] = { 'actions.select', opts = { tab = true }, desc = 'Open the entry in new tab' }, ['t'] = { 'actions.select', opts = { tab = true }, desc = 'Open the entry in new tab' },
['<C-p>'] = 'actions.preview', ['<C-p>'] = 'actions.preview',
['<C-c>'] = 'actions.close', ['<C-c>'] = 'actions.close',
['<ESC>'] = 'actions.close',
['<C-l>'] = 'actions.refresh', ['<C-l>'] = 'actions.refresh',
['-'] = 'actions.parent', ['-'] = 'actions.parent',
['_'] = 'actions.open_cwd', ['_'] = 'actions.open_cwd',
['<ESC>'] = 'actions.open_cwd',
['`'] = 'actions.cd', ['`'] = 'actions.cd',
['~'] = { 'actions.cd', opts = { scope = 'tab' }, desc = ':tcd to the current oil directory' }, ['~'] = { 'actions.cd', opts = { scope = 'tab' }, desc = ':tcd to the current oil directory' },
['gs'] = 'actions.change_sort', ['gs'] = 'actions.change_sort',