Install nvim-tree and telescope. Configure undofile. Some minor changes
This commit is contained in:
parent
54181f1123
commit
c1516e7018
10
lua/maps.lua
10
lua/maps.lua
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
-- maps.lua
|
-- maps.lua
|
||||||
local function map(mode, lhs, rhs, opts)
|
local function map(mode, lhs, rhs, opts)
|
||||||
local options = {noremap = true}
|
local options = {noremap = true}
|
||||||
@ -5,15 +6,20 @@ local function map(mode, lhs, rhs, opts)
|
|||||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = " "
|
||||||
-- Toggle Goyo
|
-- Toggle Goyo
|
||||||
map('n', '<C-g>', ':Goyo<Enter>', {noremap = false})
|
map('n', '<C-g>', ':Goyo<Enter>', {noremap = false})
|
||||||
-- Open and move to resized terminal
|
-- Open and move to resized terminal
|
||||||
map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', {noremap = false})
|
map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', {noremap = false})
|
||||||
-- Enter normal mode in terminal
|
-- Enter normal mode in terminal
|
||||||
map('t', '¿<C-N>', '<C-\\><C-N>')
|
map('t', 'ß<C-N>', '<C-\\><C-N>')
|
||||||
-- Clear highlight
|
-- Clear highlight
|
||||||
map('n', '<C-l>', '<cmd>noh<CR>')
|
map('n', '<C-l>', '<cmd>noh<CR>')
|
||||||
|
-- Telescope
|
||||||
|
map('n', '<Leader>ff', '<cmd>lua require(\'telescope.builtin\').git_files()<CR>')
|
||||||
|
map('n', '<Leader>fg', '<cmd>lua require(\'telescope.builtin\').live_grep()<CR>')
|
||||||
|
map('n', '<Leader>fb', '<cmd>lua require(\'telescope.builtin\').buffers()<CR>')
|
||||||
|
map('n', '<Leader>fh', '<cmd>lua require(\'telescope.builtin\').help_tags()<CR>')
|
||||||
-- Move to window in any mode
|
-- Move to window in any mode
|
||||||
-- map('t', 'ª', '<C-\\><C-N><C-w>h')
|
-- map('t', 'ª', '<C-\\><C-N><C-w>h')
|
||||||
-- map('t', 'º', '<C-\\><C-N><C-w>j')
|
-- map('t', 'º', '<C-\\><C-N><C-w>j')
|
||||||
|
@ -13,6 +13,14 @@ paq 'doums/darcula'
|
|||||||
paq 'junegunn/goyo.vim'
|
paq 'junegunn/goyo.vim'
|
||||||
paq 'junegunn/limelight.vim'
|
paq 'junegunn/limelight.vim'
|
||||||
|
|
||||||
|
-- Utils
|
||||||
|
paq 'nvim-lua/popup.nvim'
|
||||||
|
paq 'nvim-lua/plenary.nvim'
|
||||||
|
|
||||||
|
-- File Navigation
|
||||||
|
paq 'kyazdani42/nvim-tree.lua'
|
||||||
|
paq 'nvim-telescope/telescope.nvim'
|
||||||
|
|
||||||
-- lsp
|
-- lsp
|
||||||
paq 'neovim/nvim-lspconfig'
|
paq 'neovim/nvim-lspconfig'
|
||||||
paq 'nvim-lua/completion-nvim'
|
paq 'nvim-lua/completion-nvim'
|
||||||
|
@ -11,19 +11,21 @@ end
|
|||||||
|
|
||||||
---- Misc Options
|
---- Misc Options
|
||||||
-- global options
|
-- global options
|
||||||
opt('o', 'swapfile', true)
|
opt('o', 'backup', false)
|
||||||
opt('o', 'dir', '/tmp')
|
opt('o', 'undodir', '/Users/fschmidt/.cache/nvim/undodir')
|
||||||
opt('o', 'smartcase', true)
|
opt('o', 'smartcase', true)
|
||||||
opt('o', 'laststatus', 2)
|
opt('o', 'laststatus', 2)
|
||||||
opt('o', 'hlsearch', true)
|
opt('o', 'hidden', true)
|
||||||
opt('o', 'incsearch', true)
|
opt('o', 'hlsearch', false)
|
||||||
opt('o', 'ignorecase', true)
|
opt('o', 'incsearch', true)
|
||||||
opt('o', 'scrolloff', 12)
|
opt('o', 'ignorecase', true)
|
||||||
opt('o', 'mouse', 'a')
|
opt('o', 'scrolloff', 12)
|
||||||
|
opt('o', 'mouse', 'a')
|
||||||
|
|
||||||
-- window-local options
|
-- window-local options
|
||||||
opt('wo', 'number', true)
|
opt('wo', 'number', true)
|
||||||
opt('wo', 'wrap', false)
|
opt('wo', 'wrap', false)
|
||||||
|
opt('wo', 'signcolumn', 'yes')
|
||||||
|
|
||||||
-- buffer-local options
|
-- buffer-local options
|
||||||
opt('bo', 'shiftwidth', 4)
|
opt('bo', 'shiftwidth', 4)
|
||||||
@ -31,6 +33,8 @@ opt('bo', 'tabstop', 4)
|
|||||||
opt('bo', 'softtabstop', 4)
|
opt('bo', 'softtabstop', 4)
|
||||||
opt('bo', 'expandtab', true)
|
opt('bo', 'expandtab', true)
|
||||||
opt('bo', 'autoindent', true)
|
opt('bo', 'autoindent', true)
|
||||||
|
opt('bo', 'swapfile', false)
|
||||||
|
opt('bo', 'undofile', true)
|
||||||
|
|
||||||
---- Theme
|
---- Theme
|
||||||
-- Font
|
-- Font
|
||||||
@ -52,3 +56,6 @@ end
|
|||||||
|
|
||||||
opt('bo', 'syntax', 'on')
|
opt('bo', 'syntax', 'on')
|
||||||
ColorDarcula()
|
ColorDarcula()
|
||||||
|
|
||||||
|
|
||||||
|
-- File Navigation
|
||||||
|
Loading…
Reference in New Issue
Block a user