diff --git a/.config/nvim/lua/keys.lua b/.config/nvim/lua/keys.lua index 1a972ef..8545b0d 100644 --- a/.config/nvim/lua/keys.lua +++ b/.config/nvim/lua/keys.lua @@ -37,7 +37,7 @@ map('n', 'o', 'only') map('n', '', 'nohlsearch') wk.register({ - [''] = { 'Telescope find_files', 'File file in project' }, + [''] = { 'Telescope find_files theme=dropdown', 'File file in project' }, ['/'] = { 'Telescope live_grep', 'Search project' }, [''] = { 'NERDTreeToggle', 'Toggle NERDTree' }, @@ -45,8 +45,8 @@ wk.register({ name = 'file', e = { 'Telescope find_files cwd=~/.config/nvim', 'Find file in .config/nvim' }, E = { 'e ~/.config/nvim', 'Browse .config/nvim' }, - f = { 'Telescope find_files cwd=~/ hidden=true no_ignore=true no_ignore_parent=true follow=true', 'Find file' }, - F = { 'Telescope find_files', 'File file from here' }, + f = { 'Telescope find_files cwd=~/ hidden=true no_ignore=true no_ignore_parent=true follow=true theme=dropdown', 'Find file' }, + F = { 'Telescope find_files theme=dropdown', 'File file from here' }, l = { 'NERDTreeFind', 'Locate file' }, r = { 'Telescope oldfiles', 'Recent files' }, }, @@ -64,13 +64,24 @@ wk.register({ g = { name = 'git', s = { 'Git', 'Status' }, - f = { 'Git fetch', 'Fetch' }, p = { 'Git push --force-with-lease -u origin head', 'Push' }, + f = { + name = 'fetch', + o = { 'Git fetch origin', 'origin' }, + u = { 'Git fetch upstream', 'upstream' }, + }, r = { name = 'rebase', - m = { 'Git rebase origin/main', 'origin/main' }, - M = { 'Git rebase --interactive origin/main', 'Interactive origin/main' } + o = { 'Git rebase origin/main', 'origin/main' }, + O = { 'Git rebase --interactive origin/main', '-i origin/main' }, + u = { 'Git rebase upstream/main', 'upstream/main' }, + U = { 'Git rebase upstream/main', '-i upstream/main' }, } }, + i = { + name = 'insert', + e = { 'Telescope emoji theme=dropdown', 'emoji' }, + }, + }, { prefix = '' }) diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 93ac9f7..7048b3f 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -3,7 +3,7 @@ local ensure_packer = function() local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) - vim.cmd [[packadd packer.nvim]] + vim.cmd 'packadd packer.nvim' return true end return false @@ -42,15 +42,34 @@ return require('packer').startup(function(use) 'kana/vim-textobj-line', } + use 'sheerun/vim-polyglot' + use { + 'nvim-treesitter/nvim-treesitter', + run = function() + local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) + ts_update() + end, + config = function() + require('nvim-treesitter.configs').setup({ + indent = { enable = true }, + highlight = { enable = true }, + }) + end, + } + use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { { 'nvim-lua/plenary.nvim' }, - { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' } + { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, + { 'xiyaowong/telescope-emoji.nvim' }, }, config = function() - require('telescope').setup() + require('telescope').setup({ + defaults = { preview = false } + }) require('telescope').load_extension('fzf') + require('telescope').load_extension('emoji') end }