diff --git a/lua/maps.lua b/lua/maps.lua index 4a904ee..d004900 100644 --- a/lua/maps.lua +++ b/lua/maps.lua @@ -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', '', ':Goyo', {noremap = false}) -- Open and move to resized terminal map('n', 't', 'sj :terminal:res 5i', {noremap = false}) -- Enter normal mode in terminal -map('t', '¿', '') +map('t', 'ß', '') -- Clear highlight map('n', '', 'noh') +-- Telescope +map('n', 'ff', 'lua require(\'telescope.builtin\').git_files()') +map('n', 'fg', 'lua require(\'telescope.builtin\').live_grep()') +map('n', 'fb', 'lua require(\'telescope.builtin\').buffers()') +map('n', 'fh', 'lua require(\'telescope.builtin\').help_tags()') -- Move to window in any mode -- map('t', 'ª', 'h') -- map('t', 'º', 'j') diff --git a/lua/plugins.lua b/lua/plugins.lua index 06644fb..b89cb09 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -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' diff --git a/lua/settings.lua b/lua/settings.lua index bafc183..cdd9d7d 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -11,19 +11,21 @@ end ---- Misc Options -- global options -opt('o', 'swapfile', true) -opt('o', 'dir', '/tmp') -opt('o', 'smartcase', true) -opt('o', 'laststatus', 2) -opt('o', 'hlsearch', true) -opt('o', 'incsearch', true) -opt('o', 'ignorecase', true) -opt('o', 'scrolloff', 12) -opt('o', 'mouse', 'a') +opt('o', 'backup', false) +opt('o', 'undodir', '/Users/fschmidt/.cache/nvim/undodir') +opt('o', 'smartcase', true) +opt('o', 'laststatus', 2) +opt('o', 'hidden', true) +opt('o', 'hlsearch', false) +opt('o', 'incsearch', true) +opt('o', 'ignorecase', true) +opt('o', 'scrolloff', 12) +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