Some refactoring
This commit is contained in:
45
init.lua
45
init.lua
@ -56,10 +56,6 @@ utils.opt('o', 'showmatch', true)
|
||||
|
||||
-------------------- AUTOCOMMANDS --------------------------
|
||||
require("autocommands")
|
||||
-------------------- MAPPINGS ------------------------------
|
||||
-- <Tab> to navigate the completion menu
|
||||
utils.map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
|
||||
utils.map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {expr = true})
|
||||
-------------------- TREE-SITTER ---------------------------
|
||||
local ts = require 'nvim-treesitter.configs'
|
||||
ts.setup {ensure_installed = 'maintained', highlight = {enable = true}}
|
||||
@ -67,46 +63,7 @@ ts.setup {ensure_installed = 'maintained', highlight = {enable = true}}
|
||||
-------------------- FZF -----------------------------------
|
||||
--utils.map('n', '<C-P>', ':FZF<CR>')
|
||||
-------------------- TELESCOPE -----------------------------
|
||||
utils.map('n', '<leader>f', '<cmd>Telescope find_files<cr>')
|
||||
utils.map('n', '<C-p>', '<cmd>Telescope find_files<cr>')
|
||||
utils.map('n', '<leader>g', '<cmd>Telescope git_files<cr>')
|
||||
utils.map('n', '<leader>o', '<cmd>Telescope oldfiles<cr>')
|
||||
utils.map('n', '<leader>h', '<cmd>Telescope command_history<cr>')
|
||||
utils.map('v', '<leader>h', '<cmd>Telescope command_history<cr>')
|
||||
utils.map('n', '<C-S-p>', '<cmd>Telescope commands<cr>')
|
||||
utils.map('n', '<leader>b', '<cmd>Telescope buffers<cr>')
|
||||
utils.map('n', '<space>r', '<cmd>Telescope lsp_references<cr>')
|
||||
utils.map('n', '<C-S-o>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<A-m>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<space>v', '<cmd>Telescope lsp_document_diagnostics<cr>')
|
||||
local actions = require('telescope.actions')
|
||||
require('telescope').setup{
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<cr>"] = actions.select_tab,
|
||||
["<C-b>"] = actions.select_default,
|
||||
}
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
-- Your special builtin config goes in here
|
||||
buffers = {
|
||||
sort_lastused = true,
|
||||
previewer = false,
|
||||
theme = "dropdown",
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-w>"] = actions.delete_buffer,
|
||||
["<cr>"] = actions.select_default,
|
||||
},
|
||||
n = {
|
||||
["<c-w>"] = actions.delete_buffer,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
require('my_telescope')
|
||||
-------------------- LSP -----------------------------------
|
||||
require('mylsp')
|
||||
|
||||
|
Reference in New Issue
Block a user