Compare commits
No commits in common. "c2b60ad356aefd3ee889ba1d0f811877ff6f9441" and "ade875c1f15a08668f8e69154ace1b3c000b8659" have entirely different histories.
c2b60ad356
...
ade875c1f1
@ -133,10 +133,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|||||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
-- TIP: Disable arrow keys in normal mode
|
||||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
-- Keybinds to make split navigation easier.
|
-- Keybinds to make split navigation easier.
|
||||||
-- Use CTRL+<hjkl> to switch between windows
|
-- Use CTRL+<hjkl> to switch between windows
|
||||||
@ -273,7 +273,6 @@ require('lazy').setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
{ 'nvim-telescope/telescope-live-grep-args.nvim' },
|
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
@ -329,9 +328,6 @@ require('lazy').setup({
|
|||||||
-- Enable Telescope extensions if they are installed
|
-- Enable Telescope extensions if they are installed
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
pcall(require('telescope').load_extension, 'ui-select')
|
pcall(require('telescope').load_extension, 'ui-select')
|
||||||
pcall(require('telescope').load_extension 'live_grep_args')
|
|
||||||
|
|
||||||
local live_grep_args = require('telescope').extensions.live_grep_args
|
|
||||||
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
local builtin = require 'telescope.builtin'
|
local builtin = require 'telescope.builtin'
|
||||||
@ -381,14 +377,6 @@ require('lazy').setup({
|
|||||||
vim.keymap.set('n', '<leader>sn', function()
|
vim.keymap.set('n', '<leader>sn', function()
|
||||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||||
end, { desc = '[S]earch [N]eovim files' })
|
end, { desc = '[S]earch [N]eovim files' })
|
||||||
|
|
||||||
-- Search for TODO items in the current file
|
|
||||||
vim.keymap.set('n', '<leader>sT', function()
|
|
||||||
live_grep_args.live_grep_args {
|
|
||||||
default_text = '(TODO|XXX):.*',
|
|
||||||
search_dirs = { vim.fn.expand '%' },
|
|
||||||
}
|
|
||||||
end, { desc = '[S]earch [T]odo current file' })
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -828,16 +816,6 @@ require('lazy').setup({
|
|||||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
require('mini.surround').setup()
|
require('mini.surround').setup()
|
||||||
|
|
||||||
-- Expand and collapse object definitions.
|
|
||||||
require('mini.splitjoin').setup {
|
|
||||||
mappings = {
|
|
||||||
-- Remove default mapping
|
|
||||||
toggle = '',
|
|
||||||
},
|
|
||||||
|
|
||||||
vim.keymap.set('n', 'gs', '<cmd>lua MiniSplitjoin.toggle()<CR>', { desc = '[S]plitjoin toggle' }),
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Startup dashboard
|
-- Startup dashboard
|
||||||
require('mini.starter').setup {
|
require('mini.starter').setup {
|
||||||
footer = '',
|
footer = '',
|
||||||
|
@ -2,22 +2,19 @@
|
|||||||
-- https://github.com/nvim-focus/focus.nvim
|
-- https://github.com/nvim-focus/focus.nvim
|
||||||
return {
|
return {
|
||||||
'nvim-focus/focus.nvim',
|
'nvim-focus/focus.nvim',
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = {
|
opts = {
|
||||||
enable = true,
|
enable = true,
|
||||||
ui = {
|
ui = {
|
||||||
-- Display line numbers in the focused window only.
|
-- Display line numbers in the focused window only.
|
||||||
hybridnumber = true,
|
hybridnumber = true,
|
||||||
|
|
||||||
-- Display signcolumn in the focused window only.
|
-- Display signcolumn in the focussed window only
|
||||||
signcolumn = true,
|
signcolumn = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('focus').setup {}
|
|
||||||
|
|
||||||
local ignore_buftypes = { 'dbui' }
|
local ignore_buftypes = { 'dbui' }
|
||||||
local ignore_filetypes = { 'dbui' }
|
|
||||||
local augroup = vim.api.nvim_create_augroup('FocusDisable', { clear = true })
|
local augroup = vim.api.nvim_create_augroup('FocusDisable', { clear = true })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('WinEnter', {
|
vim.api.nvim_create_autocmd('WinEnter', {
|
||||||
@ -31,17 +28,5 @@ return {
|
|||||||
end,
|
end,
|
||||||
desc = 'Disable focus autoresize for BufType',
|
desc = 'Disable focus autoresize for BufType',
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
callback = function(_)
|
|
||||||
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
|
|
||||||
vim.b.focus_disable = true
|
|
||||||
else
|
|
||||||
vim.b.focus_disable = false
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = 'Disable focus autoresize for FileType',
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user