none-ls, codelens maps, telescope subdir maps
This commit is contained in:
parent
a1fe12252f
commit
f5b5d5d0ae
37
init.lua
37
init.lua
|
@ -180,7 +180,8 @@ au('User', {
|
|||
vim.keymap.set('', 'n', 'gj', {silent = true, buffer = true})
|
||||
vim.keymap.set('', 'e', 'gk', {silent = true, buffer = true})
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = 'Override Startify mappings',
|
||||
})
|
||||
au('BufWritePost', {
|
||||
pattern = '*/.config/nvim/init.lua',
|
||||
|
@ -322,7 +323,7 @@ require'packer'.startup(function(use)
|
|||
use 'mfussenegger/nvim-jdtls'
|
||||
use 'simrat39/rust-tools.nvim'
|
||||
use 'pmizio/typescript-tools.nvim'
|
||||
use {'jose-elias-alvarez/null-ls.nvim', requires = {'nvim-lua/plenary.nvim'}, config = function ()
|
||||
use {'nvimtools/none-ls.nvim', requires = {'nvim-lua/plenary.nvim'}, config = function ()
|
||||
local null_ls = require'null-ls'
|
||||
null_ls.setup {
|
||||
sources = {
|
||||
|
@ -434,7 +435,9 @@ require'packer'.startup(function(use)
|
|||
}
|
||||
end}
|
||||
use {'theHamsta/nvim-dap-virtual-text', config = function()
|
||||
require'nvim-dap-virtual-text'.setup{}
|
||||
require'nvim-dap-virtual-text'.setup {
|
||||
clear_on_continue = true,
|
||||
}
|
||||
end}
|
||||
use {'mxsdev/nvim-dap-vscode-js', requires = {'mfussenegger/nvim-dap'}, config = function()
|
||||
require'dap-vscode-js'.setup {
|
||||
|
@ -541,6 +544,10 @@ require'packer'.startup(function(use)
|
|||
integrations = {
|
||||
diffview = true,
|
||||
},
|
||||
signs = {
|
||||
item = {"", ""},
|
||||
section = {"", ""},
|
||||
},
|
||||
}
|
||||
end}
|
||||
use {'rcarriga/nvim-notify', after = 'telescope.nvim', config = function ()
|
||||
|
@ -555,7 +562,11 @@ require'packer'.startup(function(use)
|
|||
end}
|
||||
use 'mhinz/vim-startify'
|
||||
use {'nvim-telescope/telescope.nvim', after = 'which-key.nvim', config = function()
|
||||
require'telescope'.setup {
|
||||
local ok, telescope = pcall(require, 'telescope')
|
||||
if not ok then return end
|
||||
telescope.builtin = require'telescope.builtin'
|
||||
telescope.themes = require'telescope.themes'
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
sorting_strategy = 'ascending',
|
||||
mappings = {
|
||||
|
@ -581,8 +592,10 @@ require'packer'.startup(function(use)
|
|||
-- TODO; check if this is right
|
||||
full_path = true,
|
||||
},
|
||||
['ui-select'] = {
|
||||
require'telescope.themes'.get_cursor()
|
||||
['ui-select'] = telescope.themes.get_cursor {
|
||||
layout_config = {
|
||||
height = 15,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -592,9 +605,19 @@ require'packer'.startup(function(use)
|
|||
["<Space>"] = {'<Cmd>Telescope<CR>', 'List pickers'},
|
||||
f = {'<Cmd>Telescope find_files<CR>', 'Files'},
|
||||
F = {'<Cmd>Telescope file_browser<CR>', 'File browser'},
|
||||
['<C-f>'] = {function ()
|
||||
vim.ui.input({ completion = 'dir' }, function (input)
|
||||
telescope.builtin.find_files { search_dirs = {input} }
|
||||
end)
|
||||
end, 'Files in subdirectory'},
|
||||
d = {'<Cmd>Telescope find_files find_command=fd,--type,d,-I<CR>', 'Directories'},
|
||||
r = {'<Cmd>Telescope oldfiles<CR>', 'Recent files'},
|
||||
g = {'<Cmd>Telescope live_grep<CR>', 'Grep'},
|
||||
G = {function ()
|
||||
vim.ui.input({ completion = 'dir' }, function(input)
|
||||
telescope.builtin.live_grep { search_dirs = {input} }
|
||||
end)
|
||||
end, 'Grep in subdirectory'},
|
||||
b = {'<Cmd>Telescope buffers<CR>', 'Buffers'},
|
||||
e = {'<Cmd>Telescope diagnostics<CR>', 'Diagnostics'},
|
||||
h = {'<Cmd>Telescope help_tags<CR>', 'Help page'},
|
||||
|
@ -887,6 +910,8 @@ local function on_attach(client, bufnr)
|
|||
i = {'<Cmd>Telescope lsp_implementations<CR>', 'Implementation'},
|
||||
a = {vim.lsp.buf.code_action, 'Code action'},
|
||||
r = {vim.lsp.buf.rename, 'Rename'},
|
||||
l = {vim.lsp.codelens.refresh, 'Show codelenses'},
|
||||
L = {vim.lsp.codelens.run, 'Run codelens'},
|
||||
t = {'<Cmd>Telescope lsp_type_definitions<CR>', 'Type definition'},
|
||||
u = {'<Cmd>Telescope lsp_references<CR>', 'Usages/references'}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue