|
|
@ -20,12 +20,26 @@ require("core.options")
|
|
|
|
options = { noremap = true }
|
|
|
|
options = { noremap = true }
|
|
|
|
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
|
|
|
map('n', '<Leader>ff', ':Telescope find_files<Enter>', options)
|
|
|
|
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
|
|
|
map('n', '<Leader>fg', ':Telescope git_files<Enter>', options)
|
|
|
|
map('n', '<Leader>gc', ':Telescope git_commits<Enter>', options)
|
|
|
|
map('n', '<Leader>fc', ':Telescope git_commits<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>fl', ':Telescope live_grep<Enter>', options)
|
|
|
|
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
|
|
|
map('n', '<Leader><Space>', ':Telescope buffers<Enter>', options)
|
|
|
|
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
|
|
|
map('n', '<Leader>t', ':TagbarToggle<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>nv', ':Telescope find_files cwd=~/.config/nvim<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>nc', ':Telescope find_files cwd=~/.config<Enter>', options)
|
|
|
|
|
|
|
|
|
|
|
|
vim.g.grammalecte_cli_py = "~/Grammalecte-fr/grammalecte-cli.py"
|
|
|
|
map('n', '<Leader>gd', ':Telescope lsp_definitions<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>gr', ':Telescope lsp_references<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>gs', ':Telescope lsp_workspace_symbols<Enter>', options)
|
|
|
|
|
|
|
|
map('n', '<Leader>gS', ':Telescope lsp_dynamic_workspace_symbols<Enter>', options)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
-- Telescope
|
|
|
|
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
require('telescope').setup{
|
|
|
|
|
|
|
|
defaults = {
|
|
|
|
|
|
|
|
prompt_prefix = "> ",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------
|
|
|
|
--------------------------------------------------
|
|
|
|
-- LSP
|
|
|
|
-- LSP
|
|
|
@ -51,11 +65,11 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|
|
|
local opts = {buffer = event.buf}
|
|
|
|
local opts = {buffer = event.buf}
|
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
|
|
|
--vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
|
|
|
--vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
|
|
|
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
|
|
|
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
|
|
|
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
|
|
|
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
|
|
|
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
|
|
|