Install nvim-tree and telescope. Configure undofile. Some minor changes

This commit is contained in:
Fabian Schmidt 2021-03-02 16:11:31 +01:00
parent 54181f1123
commit c1516e7018
3 changed files with 32 additions and 11 deletions

View File

@ -1,3 +1,4 @@
-- maps.lua
local function map(mode, lhs, rhs, opts)
local options = {noremap = true}
@ -5,15 +6,20 @@ local function map(mode, lhs, rhs, opts)
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
vim.g.mapleader = ","
vim.g.mapleader = " "
-- Toggle Goyo
map('n', '<C-g>', ':Goyo<Enter>', {noremap = false})
-- Open and move to resized terminal
map('n', '<leader>t', '<C-w>s<C-w>j :terminal<CR>:res 5<CR>i', {noremap = false})
-- Enter normal mode in terminal
map('t', '¿<C-N>', '<C-\\><C-N>')
map('t', 'ß<C-N>', '<C-\\><C-N>')
-- Clear highlight
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
-- map('t', 'ª', '<C-\\><C-N><C-w>h')
-- map('t', 'º', '<C-\\><C-N><C-w>j')

View File

@ -13,6 +13,14 @@ paq 'doums/darcula'
paq 'junegunn/goyo.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
paq 'neovim/nvim-lspconfig'
paq 'nvim-lua/completion-nvim'

View File

@ -11,11 +11,12 @@ end
---- Misc Options
-- global options
opt('o', 'swapfile', true)
opt('o', 'dir', '/tmp')
opt('o', 'backup', false)
opt('o', 'undodir', '/Users/fschmidt/.cache/nvim/undodir')
opt('o', 'smartcase', true)
opt('o', 'laststatus', 2)
opt('o', 'hlsearch', true)
opt('o', 'hidden', true)
opt('o', 'hlsearch', false)
opt('o', 'incsearch', true)
opt('o', 'ignorecase', true)
opt('o', 'scrolloff', 12)
@ -24,6 +25,7 @@ opt('o', 'mouse', 'a')
-- window-local options
opt('wo', 'number', true)
opt('wo', 'wrap', false)
opt('wo', 'signcolumn', 'yes')
-- buffer-local options
opt('bo', 'shiftwidth', 4)
@ -31,6 +33,8 @@ opt('bo', 'tabstop', 4)
opt('bo', 'softtabstop', 4)
opt('bo', 'expandtab', true)
opt('bo', 'autoindent', true)
opt('bo', 'swapfile', false)
opt('bo', 'undofile', true)
---- Theme
-- Font
@ -52,3 +56,6 @@ end
opt('bo', 'syntax', 'on')
ColorDarcula()
-- File Navigation