(neovim) code formatting
This commit is contained in:
parent
aee5f18c4a
commit
95b8aef98d
7 changed files with 47 additions and 47 deletions
|
@ -74,7 +74,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||
end
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if
|
||||
client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
|
||||
client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
|
||||
then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup("lsp-highlight", { clear = false })
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
|
|
|
@ -5,7 +5,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
|
|
|
@ -113,24 +113,24 @@ local function check_lsp_capabilities()
|
|||
local caps = client.server_capabilities
|
||||
|
||||
local capability_list = {
|
||||
{ "Completion", caps.completionProvider },
|
||||
{ "Hover", caps.hoverProvider },
|
||||
{ "Signature Help", caps.signatureHelpProvider },
|
||||
{ "Go to Definition", caps.definitionProvider },
|
||||
{ "Go to Declaration", caps.declarationProvider },
|
||||
{ "Go to Implementation", caps.implementationProvider },
|
||||
{ "Go to Type Definition", caps.typeDefinitionProvider },
|
||||
{ "Find References", caps.referencesProvider },
|
||||
{ "Document Highlight", caps.documentHighlightProvider },
|
||||
{ "Document Symbol", caps.documentSymbolProvider },
|
||||
{ "Workspace Symbol", caps.workspaceSymbolProvider },
|
||||
{ "Code Action", caps.codeActionProvider },
|
||||
{ "Code Lens", caps.codeLensProvider },
|
||||
{ "Document Formatting", caps.documentFormattingProvider },
|
||||
{ "Completion", caps.completionProvider },
|
||||
{ "Hover", caps.hoverProvider },
|
||||
{ "Signature Help", caps.signatureHelpProvider },
|
||||
{ "Go to Definition", caps.definitionProvider },
|
||||
{ "Go to Declaration", caps.declarationProvider },
|
||||
{ "Go to Implementation", caps.implementationProvider },
|
||||
{ "Go to Type Definition", caps.typeDefinitionProvider },
|
||||
{ "Find References", caps.referencesProvider },
|
||||
{ "Document Highlight", caps.documentHighlightProvider },
|
||||
{ "Document Symbol", caps.documentSymbolProvider },
|
||||
{ "Workspace Symbol", caps.workspaceSymbolProvider },
|
||||
{ "Code Action", caps.codeActionProvider },
|
||||
{ "Code Lens", caps.codeLensProvider },
|
||||
{ "Document Formatting", caps.documentFormattingProvider },
|
||||
{ "Document Range Formatting", caps.documentRangeFormattingProvider },
|
||||
{ "Rename", caps.renameProvider },
|
||||
{ "Folding Range", caps.foldingRangeProvider },
|
||||
{ "Selection Range", caps.selectionRangeProvider },
|
||||
{ "Rename", caps.renameProvider },
|
||||
{ "Folding Range", caps.foldingRangeProvider },
|
||||
{ "Selection Range", caps.selectionRangeProvider },
|
||||
}
|
||||
|
||||
for _, cap in ipairs(capability_list) do
|
||||
|
|
|
@ -17,8 +17,8 @@ local lualine_sections = {
|
|||
lualine_x = {},
|
||||
lualine_y = {
|
||||
{ "searchcount" },
|
||||
{ "progress", padding = { left = 1, right = 0 }, separator = " " },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
{ "progress", padding = { left = 1, right = 0 }, separator = " " },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
lualine_z = {},
|
||||
}
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("mini.pairs").setup({
|
||||
modes = { insert = true, command = true, terminal = false },
|
||||
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
skip_ts = { "string" },
|
||||
skip_unbalanced = true,
|
||||
markdown = true,
|
||||
})
|
||||
end,
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("mini.pairs").setup({
|
||||
modes = { insert = true, command = true, terminal = false },
|
||||
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
skip_ts = { "string" },
|
||||
skip_unbalanced = true,
|
||||
markdown = true,
|
||||
})
|
||||
end,
|
||||
|
||||
},
|
||||
{
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
priority = 10000,
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"echasnovski/mini.icons",
|
||||
"echasnovski/mini.pairs",
|
||||
},
|
||||
config = function()
|
||||
require("monokai-pro").setup({
|
||||
filter = "classic",
|
||||
})
|
||||
vim.cmd.colorscheme("monokai-pro")
|
||||
end,
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
priority = 10000,
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"echasnovski/mini.icons",
|
||||
"echasnovski/mini.pairs",
|
||||
},
|
||||
config = function()
|
||||
require("monokai-pro").setup({
|
||||
filter = "classic",
|
||||
})
|
||||
vim.cmd.colorscheme("monokai-pro")
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ local whichkey_spec = {
|
|||
|
||||
if MainHost then
|
||||
vim.list_extend(whichkey_spec, {
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>cd", vim.diagnostic.open_float, { desc = "diagnostics", remap = true } },
|
||||
{
|
||||
"<leader>cf",
|
||||
|
|
|
@ -39,7 +39,7 @@ return {
|
|||
draw = {
|
||||
columns = {
|
||||
{ "kind_icon" },
|
||||
{ "label", "label_description", gap = 1 },
|
||||
{ "label", "label_description", gap = 1 },
|
||||
{ "kind" },
|
||||
{ "source_name" },
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue