Compare commits

...

2 Commits

Author SHA1 Message Date
siduck 03ed1579c5 Breaking change: replace nvterm with UI term module 2023-08-15 20:26:23 +05:30
siduck 5644603144 include cmp-lsp capabilities for lspconfig capabilities 2023-08-15 20:26:06 +05:30
3 changed files with 73 additions and 80 deletions

View File

@ -281,67 +281,48 @@ M.telescope = {
},
}
M.nvterm = {
plugin = true,
t = {
-- toggle in terminal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"Toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"Toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"Toggle vertical term",
},
},
M.terminal = {
n = {
-- toggle in normal mode
["<A-i>"] = {
function()
require("nvterm.terminal").toggle "float"
end,
"Toggle floating term",
},
["<A-h>"] = {
function()
require("nvterm.terminal").toggle "horizontal"
end,
"Toggle horizontal term",
},
["<A-v>"] = {
function()
require("nvterm.terminal").toggle "vertical"
end,
"Toggle vertical term",
},
-- new
["<leader>h"] = {
function()
require("nvterm.terminal").new "horizontal"
require("nvchad.term").new { pos = "sp", size = 0.3 }
end,
"New horizontal term",
},
["<leader>v"] = {
function()
require("nvterm.terminal").new "vertical"
require("nvchad.term").new { pos = "vsp", size = 0.2 }
end,
"New vertical term",
},
["<A-v>"] = {
function()
require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" }
end,
"New vertical term",
},
["<A-h>"] = {
function()
require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 }
end,
"New vertical term",
},
},
t = {
["<A-v>"] = {
function()
require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" }
end,
"New vertical term",
},
["<A-h>"] = {
function()
require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 }
end,
"New vertical term",
},

View File

@ -21,26 +21,49 @@ M.on_attach = function(client, bufnr)
end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
M.cmp_lsp_capabilities = {
textDocument = {
completion = {
dynamicRegistration = false,
completionItem = {
snippetSupport = true,
commitCharactersSupport = true,
deprecatedSupport = true,
preselectSupport = true,
tagSupport = { valueSet = { 1 } },
insertReplaceSupport = true,
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
insertTextModeSupport = {
valueSet = {
1, -- asIs
2, -- adjustIndentation
},
},
labelDetailsSupport = true,
},
contextSupport = true,
insertTextMode = 1,
completionList = {
itemDefaults = {
"commitCharacters",
"editRange",
"insertTextFormat",
"insertTextMode",
"data",
},
},
},
},
}
M.capabilities = vim.tbl_deep_extend("force", vim.lsp.protocol.make_client_capabilities(), M.cmp_lsp_capabilities)
require("lspconfig").lua_ls.setup {
on_attach = M.on_attach,
capabilities = M.capabilities,

View File

@ -14,21 +14,10 @@ local default_plugins = {
{
"NvChad/ui",
branch = "v2.0",
branch = "term",
lazy = false,
},
{
"NvChad/nvterm",
init = function()
require("core.utils").load_mappings "nvterm"
end,
config = function(_, opts)
require "base46.term"
require("nvterm").setup(opts)
end,
},
{
"NvChad/nvim-colorizer.lua",
init = function()