mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-07 19:35:17 +02:00
lsp ghost text optional config
This commit is contained in:
parent
9faad80261
commit
f60855a938
8 changed files with 149 additions and 36 deletions
|
@ -1,11 +1,13 @@
|
|||
local cmprg = false
|
||||
local cmpcalc = false
|
||||
local cmptag = false
|
||||
local lspghost_text = false
|
||||
local data_exists, custom_cmp = pcall(require, "core.config")
|
||||
if data_exists then
|
||||
cmprg = custom_cmp.cmprg
|
||||
cmpcalc = custom_cmp.cmpcalc
|
||||
cmptag = custom_cmp.cmptag
|
||||
lspghost_text = custom_cmp.lspghost_text
|
||||
end
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
@ -90,7 +92,7 @@ return {
|
|||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
ghost_text = lspghost_text,
|
||||
native_menu = false,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ return {
|
|||
-- for Speed up loading Lua modules in Neovim to improve startup time.
|
||||
{
|
||||
"lewis6991/impatient.nvim",
|
||||
event = "BufRead",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("user.impatient")
|
||||
end,
|
||||
|
@ -217,8 +217,26 @@ return {
|
|||
-- for popup alert
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
keys = {
|
||||
{
|
||||
"<leader>un",
|
||||
function()
|
||||
require("notify").dismiss({ silent = true, pending = true })
|
||||
end,
|
||||
desc = "Delete all Notifications",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
timeout = 3000,
|
||||
max_height = function()
|
||||
return math.floor(vim.o.lines * 0.75)
|
||||
end,
|
||||
max_width = function()
|
||||
return math.floor(vim.o.columns * 0.75)
|
||||
end,
|
||||
},
|
||||
-- event = "BufWinEnter",
|
||||
init = function()
|
||||
local notify = require("notify")
|
||||
-- this for transparency
|
||||
notify.setup({ background_colour = "#000000" })
|
||||
|
@ -237,12 +255,20 @@ return {
|
|||
-- for popup input
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
require("user.dressing")
|
||||
lazy = true,
|
||||
init = function()
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.ui.select = function(...)
|
||||
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||
return vim.ui.select(...)
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.ui.input = function(...)
|
||||
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||
return vim.ui.input(...)
|
||||
end
|
||||
end,
|
||||
},
|
||||
-- mini scrollview
|
||||
}, -- mini scrollview
|
||||
{
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "BufRead",
|
||||
|
@ -275,5 +301,6 @@ return {
|
|||
require("user.gitsigns")
|
||||
end,
|
||||
},
|
||||
-- for loading info
|
||||
-- remove duplicate
|
||||
{ "tpope/vim-repeat", event = "VeryLazy" },
|
||||
}
|
||||
|
|
|
@ -32,9 +32,14 @@ return {
|
|||
-- event = "BufWinEnter",
|
||||
cmd = { "NvimTree", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||
-- dependencies = "kyazdani42/nvim-web-devicons",
|
||||
-- config = function()
|
||||
-- require("user.nvim-tree")
|
||||
-- end,
|
||||
config = function()
|
||||
local data_exists, treeconfig = pcall(require, "core.config")
|
||||
if data_exists then
|
||||
if treeconfig.loadnvimtree_lazy then
|
||||
require("user.nvim-tree")
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
-- for file tab
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue