|
|
@ -65,7 +65,6 @@ nmap("<leader>t", "<cmd>FloatermToggle<cr>") |
|
|
|
map("t", "<leader>t", "<cmd>FloatermToggle<cr>") |
|
|
|
map("t", "<leader>t", "<cmd>FloatermToggle<cr>") |
|
|
|
|
|
|
|
|
|
|
|
-- lsp on_attach mappings |
|
|
|
-- lsp on_attach mappings |
|
|
|
|
|
|
|
|
|
|
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) |
|
|
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) |
|
|
|
local on_attach = function(client, bufnr) |
|
|
|
local on_attach = function(client, bufnr) |
|
|
|
-- Enable completion triggered by <c-x><c-o> |
|
|
|
-- Enable completion triggered by <c-x><c-o> |
|
|
@ -123,13 +122,6 @@ lsp.sumneko_lua.setup { on_attach = on_attach, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
-- lsp diagnostic mapping |
|
|
|
|
|
|
|
local opts = { noremap = true, silent = true } |
|
|
|
|
|
|
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts) |
|
|
|
|
|
|
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) |
|
|
|
|
|
|
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) |
|
|
|
|
|
|
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.cmd("colorscheme carbonfox") |
|
|
|
vim.cmd("colorscheme carbonfox") |
|
|
|
|
|
|
|
|
|
|
|
-- packer boilerplate |
|
|
|
-- packer boilerplate |
|
|
@ -201,7 +193,9 @@ return require('packer').startup(function(use) |
|
|
|
} |
|
|
|
} |
|
|
|
use { |
|
|
|
use { |
|
|
|
'folke/trouble.nvim', |
|
|
|
'folke/trouble.nvim', |
|
|
|
config = function() require("trouble").setup {} |
|
|
|
config = function() require("trouble").setup { |
|
|
|
|
|
|
|
nmap("<leader>xx", "<cmd>TroubleToggle<cr>"); |
|
|
|
|
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
|
} |
|
|
|
} |
|
|
|
use { |
|
|
|
use { |
|
|
@ -265,11 +259,17 @@ return require('packer').startup(function(use) |
|
|
|
} |
|
|
|
} |
|
|
|
use { 'lewis6991/gitsigns.nvim', |
|
|
|
use { 'lewis6991/gitsigns.nvim', |
|
|
|
config = function() |
|
|
|
config = function() |
|
|
|
require('gitsigns').setup() |
|
|
|
require('gitsigns').setup { |
|
|
|
|
|
|
|
on_attach = function(bufnr) |
|
|
|
|
|
|
|
nmap('<leader>hd', '<cmd>Gitsigns diffthis<cr>') |
|
|
|
|
|
|
|
nmap('<leader>hp', '<cmd>Gitsigns preview_hunk<cr>') |
|
|
|
|
|
|
|
nmap('<leader>td', '<cmd>Gitsigns toggle_deleted<cr>') |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
|
} |
|
|
|
} |
|
|
|
use { |
|
|
|
use { 'sudormrfbin/cheatsheet.nvim', |
|
|
|
'sudormrfbin/cheatsheet.nvim', |
|
|
|
-- default toggle is <leader>? |
|
|
|
requires = { |
|
|
|
requires = { |
|
|
|
{ 'nvim-telescope/telescope.nvim' }, |
|
|
|
{ 'nvim-telescope/telescope.nvim' }, |
|
|
|
{ 'nvim-lua/popup.nvim' }, |
|
|
|
{ 'nvim-lua/popup.nvim' }, |
|
|
|