Update lsp and git integration
This commit is contained in:
parent
88e753ee4c
commit
42489a70f2
@ -28,6 +28,12 @@ vim.api.nvim_set_keymap('', '<leader>gs', ':Gitsigns toggle_signs<cr>',
|
||||
-- lsp stuff
|
||||
vim.api.nvim_buf_set_keymap(0, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>',
|
||||
{noremap = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>K',
|
||||
'<cmd>lua vim.diagnostic.open_float()<CR>',
|
||||
{noremap = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>qf',
|
||||
'<cmd>lua vim.diagnostic.setqflist({open = false})<cr><cmd>Telescope quickfix<cr>',
|
||||
{silent = true})
|
||||
-- toggle tagbar
|
||||
vim.api.nvim_set_keymap('', '<leader>tt', ':TagbarToggle<cr>', {silent = true})
|
||||
-- toggle NvimTree
|
||||
@ -42,14 +48,6 @@ vim.api.nvim_set_keymap('', '<leader>w', ':HopWordAC<cr>', {silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>l', ':HopWordCurrentLine<cr>',
|
||||
{silent = true})
|
||||
-- telescope stuff
|
||||
vim.api.nvim_set_keymap('', '<leader>tf', ':Telescope fd<cr>', {silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>fd', ':Telescope fd<cr>', {silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>tb', ':Telescope buffers<cr>',
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>tq', ':Telescope quickfix<cr>',
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>tdd',
|
||||
':Telescope lsp_document_diagnostics<cr>',
|
||||
{silent = true})
|
||||
vim.api.nvim_set_keymap('', '<leader>tdw',
|
||||
':Telescope lsp_workspace_diagnostics<cr>',
|
||||
{silent = true})
|
||||
|
@ -25,6 +25,7 @@ return require('packer').startup(function(use)
|
||||
after = 'packer.nvim',
|
||||
config = function()
|
||||
vim.g.serenade_enable_italic = 1
|
||||
vim.g.serenade_sign_column_background = 'none'
|
||||
vim.g.serenade_better_performance = 1
|
||||
vim.cmd("colorscheme serenade")
|
||||
end
|
||||
@ -113,6 +114,7 @@ return require('packer').startup(function(use)
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = {{'nvim-lua/plenary.nvim'}},
|
||||
config = function() require "plugins.telescope" end,
|
||||
cmd = 'Telescope'
|
||||
}
|
||||
use {'preservim/tagbar', cmd = 'TagbarToggle'}
|
||||
|
@ -17,12 +17,14 @@ require('gitsigns').setup {
|
||||
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
||||
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
|
||||
},
|
||||
numhl = false,
|
||||
|
||||
sign_priority = 5,
|
||||
-- signs
|
||||
status_formatter = nil, -- Use default
|
||||
numhl = false,
|
||||
sign_priority = 10,
|
||||
signs = {
|
||||
add = {hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr"},
|
||||
change = {hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr"},
|
||||
add = {hl = "DiffAdd", text = "+", numhl = "GitSignsAddNr"},
|
||||
change = {hl = "DiffChange", text = ">", numhl = "GitSignsChangeNr"},
|
||||
changedelete = {
|
||||
hl = "DiffChange",
|
||||
text = "~",
|
||||
@ -35,7 +37,15 @@ require('gitsigns').setup {
|
||||
numhl = "GitSignsDeleteNr"
|
||||
}
|
||||
},
|
||||
yadm = {enable = true},
|
||||
|
||||
status_formatter = nil, -- Use default
|
||||
watch_gitdir = {interval = 100}
|
||||
-- Current line blame
|
||||
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 250,
|
||||
ignore_whitespace = false
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>'
|
||||
}
|
||||
|
27
lua/plugins/telescope.lua
Normal file
27
lua/plugins/telescope.lua
Normal file
@ -0,0 +1,27 @@
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
-- Default configuration for telescope goes here:
|
||||
-- config_key = value,
|
||||
-- ..
|
||||
layout_strategy = 'vertical',
|
||||
layout_config = {height = 0.95}
|
||||
|
||||
},
|
||||
pickers = {
|
||||
-- Default configuration for builtin pickers goes here:
|
||||
-- picker_name = {
|
||||
-- picker_config_key = value,
|
||||
-- ...
|
||||
-- }
|
||||
-- Now the picker_config_key will be applied every time you call this
|
||||
-- builtin picker
|
||||
},
|
||||
extensions = {
|
||||
-- Your extension configuration goes here:
|
||||
-- extension_name = {
|
||||
-- extension_config_key = value,
|
||||
-- }
|
||||
-- please take a look at the readme of the extension you want to configure
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user