-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
262 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
local M = {} | ||
M.actions = function() | ||
return { | ||
['Format (<leader>lp)'] = function() | ||
require('user.lsp.formatting').format() | ||
end, | ||
['Code Actions (<leader>la)'] = function() | ||
vim.lsp.buf.code_action() | ||
end, | ||
['Code Lens (<leader>lx)'] = function() | ||
vim.lsp.codelens.run() | ||
end, | ||
['Show Definition (gd)'] = function() | ||
vim.cmd 'Lspsaga peek_definition' | ||
end, | ||
['Show Declaration (gD)'] = function() | ||
vim.lsp.buf.declaration() | ||
end, | ||
['Show Type Definition (gy)'] = function() | ||
vim.lsp.buf.type_definition() | ||
end, | ||
['Show Implementation (gi)'] = function() | ||
vim.lsp.buf.implementation() | ||
end, | ||
['Find References (gr)'] = function() | ||
vim.cmd 'Lspsaga finder' | ||
end, | ||
['Signature Help (<leader>lk)'] = function() | ||
vim.lsp.buf.signature_help() | ||
end, | ||
['Signature Documentation (K)'] = function() | ||
-- vim.lsp.buf.hover() | ||
vim.cmd 'Lspsaga hover_doc' | ||
end, | ||
['Rename symbol (<leader>lrn)'] = function() | ||
vim.cmd 'Lspsaga rename ++project' | ||
end, | ||
['Diagnostics quickfix list (<leader>lq)'] = function() | ||
vim.diagnostic.setqflist() | ||
end, | ||
['Clear Diagnostics'] = function() | ||
vim.diagnostic.reset() | ||
end, | ||
['Delete Log'] = function() | ||
vim.system { 'rm', '-rf', vim.lsp.get_log_path() } | ||
end, | ||
} | ||
end | ||
|
||
M.setup = function() | ||
require('user.menu').add_actions('LSP', M.actions()) | ||
end | ||
|
||
return M |
Oops, something went wrong.