diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -73,11 +73,18 @@ end -- Along with the highlight definition for ColorColumn above, these options -- will set colored marks at certain line lengths -cmd([[au BufEnter *.py let w:m1=matchadd('ColorColumn', '\%81v', 100)]]) -cmd([[au BufEnter *.py let w:m2=matchadd('Error', '\%121v', 100)]]) -cmd([[au BufLeave *.py call clearmatches()"]]) +cmd [[ +au BufEnter *.py let w:m1=matchadd('ColorColumn', '\%81v', 100) +au BufEnter *.py let w:m2=matchadd('Error', '\%121v', 100) +au BufLeave *.py call clearmatches() +]] +-- Custom commands +cmd [[ +command! MakeTagsPython !ctags --exclude=venv --languages=python --python-kinds=-i -R . +]] + options = { noremap = true } @@ -93,6 +100,7 @@ map('n', '<leader>fj', '<cmd>Telescope jumplist<cr>', options) map('n', '<leader>f/', '<cmd>Telescope live_grep<cr>', options) map('n', '<leader>fa', '<cmd>Telescope grep_string<cr>', options) map('n', '<leader>fg', "<cmd>lua require('telescope.builtin').git_status()<cr>", options) +map('n', '<leader>ft', "<cmd>lua require('telescope.builtin').tags({layout_strategy='center', only_sort_tags=true, show_line=true})<cr>", options) map('n', '<leader>du', '<cmd>diffupdate<cr>', options) map('n', '<leader>dd', '<cmd>diffget<cr>', options) @@ -286,10 +294,23 @@ return require('packer').startup(function() use 'tpope/vim-repeat' use { 'nvim-telescope/telescope.nvim', - requires = { {'nvim-lua/plenary.nvim'} }, + requires = { + {'nvim-lua/plenary.nvim'}, + {'glepnir/lspsaga.nvim'}, + {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, + }, config = function() actions = require("telescope.actions") require("telescope").setup{ + extensions = { + fzf = { + fuzzy = false, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + } + }, defaults = { mappings = { i = { @@ -339,6 +360,7 @@ return require('packer').startup(function() buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker } } + require('telescope').load_extension('fzf') end, } use 'FooSoft/vim-argwrap' |