mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 09:18:44 +02:00
fix: support neovim v0.10
This commit is contained in:
parent
f00aeb3add
commit
5179bb1047
13 changed files with 515 additions and 513 deletions
|
@ -1,6 +0,0 @@
|
||||||
column_width = 120
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferDouble"
|
|
||||||
no_call_parentheses = true
|
|
|
@ -2,7 +2,7 @@
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
|
"Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "0dfc19b7a15a3bc47b975fcffde03859c46dd097" },
|
"bufferline.nvim": { "branch": "main", "commit": "73edc1f2732678e7a681e3d3be49782610914f6b" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
|
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" },
|
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" },
|
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
|
||||||
"lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" },
|
"lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "73fb37ed77b18ac357ca8e6e35835a8db6602332" },
|
"nvim-treesitter": { "branch": "master", "commit": "73fb37ed77b18ac357ca8e6e35835a8db6602332" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "6f38e4231c34497259121a007c61a0fd2f16403e" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "62db4b3054ec6847e5cb189b4dea452ce0c7ad7f" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cbab9ad88036915beebd13b47e100743ff2ed2d5" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cbab9ad88036915beebd13b47e100743ff2ed2d5" },
|
||||||
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
|
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
|
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
-- bootstrap lazy.nvim
|
-- bootstrap lazy.nvim
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git", "clone",
|
"git", "clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable",
|
"--branch=stable",
|
||||||
lazypath
|
lazypath
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local icons = require("user.icons").ui
|
local icons = require("user.icons").ui
|
||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = " "
|
vim.g.maplocalleader = " "
|
||||||
vim.diagnostic.config({ virtual_lines = false })
|
vim.diagnostic.config({ virtual_lines = false })
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
{ import = "custom.plugins" },
|
{ import = "custom.plugins" },
|
||||||
},
|
},
|
||||||
defaults = {
|
defaults = {
|
||||||
lazy = true, -- every plugin is lazy-loaded by default
|
lazy = true, -- every plugin is lazy-loaded by default
|
||||||
version = "*", -- try installing the latest stable version for plugins that support semver
|
version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
backdrop = 100,
|
backdrop = 100,
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
browser = "chrome",
|
browser = "chrome",
|
||||||
throttle = 40,
|
throttle = 40,
|
||||||
custom_keys = { ["<localleader>l"] = false },
|
custom_keys = { ["<localleader>l"] = false },
|
||||||
icons = {
|
icons = {
|
||||||
ft = icons.ft,
|
ft = icons.ft,
|
||||||
lazy = icons.Bell .. " ",
|
lazy = icons.Bell .. " ",
|
||||||
loaded = icons.CheckCircle,
|
loaded = icons.CheckCircle,
|
||||||
not_loaded = icons.not_loaded,
|
not_loaded = icons.not_loaded,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
change_detection = { enabled = false, notify = false },
|
change_detection = { enabled = false, notify = false },
|
||||||
checker = { enabled = true }, -- automatically check for plugin updates
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
-- disable some rtp plugins
|
-- disable some rtp plugins
|
||||||
disabled_plugins = {
|
disabled_plugins = {
|
||||||
"gzip",
|
"gzip",
|
||||||
"matchit",
|
"matchit",
|
||||||
"matchparen",
|
"matchparen",
|
||||||
"netrwPlugin",
|
"netrwPlugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
"tohtml",
|
"tohtml",
|
||||||
"tutor",
|
"tutor",
|
||||||
"zipPlugin",
|
"zipPlugin",
|
||||||
"lazyredraw",
|
"lazyredraw",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
|
@ -1,6 +1,6 @@
|
||||||
require("custom.default")
|
require("custom.default")
|
||||||
require("custom.dashboard")
|
require("custom.dashboard")
|
||||||
require("config.lazy")
|
require("config.lazy_lib")
|
||||||
require("user.colorscheme")
|
require("user.colorscheme")
|
||||||
require("user.keymaps")
|
require("user.keymaps")
|
||||||
-- require("user.snip")
|
-- require("user.snip")
|
||||||
|
|
|
@ -37,7 +37,7 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("user.lsp.null-ls")
|
require("user.lsp.null-lscfg")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
|
|
|
@ -1,74 +1,76 @@
|
||||||
local status_ok, chatgpt = pcall(require, "chatgpt")
|
local status_ok, chatgpt = pcall(require, "chatgpt")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local WELCOME_MESSAGE = [[
|
||||||
chatgpt.setup({
|
Welcome to ChatGPT.
|
||||||
welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy godot robot
|
]]
|
||||||
loading_text = "loading",
|
chatgpt.setup {
|
||||||
question_sign = "", -- you can use emoji if you want e.g. 🙂
|
welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy godot robot
|
||||||
answer_sign = "ﮧ", -- 🤖
|
loading_text = "loading",
|
||||||
max_line_length = 120,
|
question_sign = "", -- you can use emoji if you want e.g. 🙂
|
||||||
yank_register = "+",
|
answer_sign = "ﮧ", -- 🤖
|
||||||
chat_layout = {
|
max_line_length = 120,
|
||||||
relative = "editor",
|
yank_register = "+",
|
||||||
position = "50%",
|
chat_layout = {
|
||||||
size = {
|
relative = "editor",
|
||||||
height = "80%",
|
position = "50%",
|
||||||
width = "80%",
|
size = {
|
||||||
},
|
height = "80%",
|
||||||
},
|
width = "80%",
|
||||||
settings_window = {
|
},
|
||||||
border = {
|
},
|
||||||
style = "rounded",
|
settings_window = {
|
||||||
text = {
|
border = {
|
||||||
top = " Settings ",
|
style = "rounded",
|
||||||
},
|
text = {
|
||||||
},
|
top = " Settings ",
|
||||||
},
|
},
|
||||||
chat_window = {
|
},
|
||||||
filetype = "chatgpt",
|
},
|
||||||
border = {
|
chat_window = {
|
||||||
highlight = "FloatBorder",
|
filetype = "chatgpt",
|
||||||
style = "rounded",
|
border = {
|
||||||
text = {
|
highlight = "FloatBorder",
|
||||||
top = " ChatGPT ",
|
style = "rounded",
|
||||||
},
|
text = {
|
||||||
},
|
top = " ChatGPT ",
|
||||||
},
|
},
|
||||||
chat_input = {
|
},
|
||||||
prompt = " ",
|
},
|
||||||
border = {
|
chat_input = {
|
||||||
highlight = "FloatBorder",
|
prompt = " ",
|
||||||
style = "rounded",
|
border = {
|
||||||
text = {
|
highlight = "FloatBorder",
|
||||||
top_align = "center",
|
style = "rounded",
|
||||||
top = " Prompt ",
|
text = {
|
||||||
},
|
top_align = "center",
|
||||||
},
|
top = " Prompt ",
|
||||||
},
|
},
|
||||||
openai_params = {
|
},
|
||||||
model = "text-davinci-003",
|
},
|
||||||
frequency_penalty = 0,
|
openai_params = {
|
||||||
presence_penalty = 0,
|
model = "text-davinci-003",
|
||||||
max_tokens = 300,
|
frequency_penalty = 0,
|
||||||
temperature = 0,
|
presence_penalty = 0,
|
||||||
top_p = 1,
|
max_tokens = 300,
|
||||||
n = 1,
|
temperature = 0,
|
||||||
},
|
top_p = 1,
|
||||||
openai_edit_params = {
|
n = 1,
|
||||||
model = "code-davinci-edit-001",
|
},
|
||||||
temperature = 0,
|
openai_edit_params = {
|
||||||
top_p = 1,
|
model = "code-davinci-edit-001",
|
||||||
n = 1,
|
temperature = 0,
|
||||||
},
|
top_p = 1,
|
||||||
keymaps = {
|
n = 1,
|
||||||
close = { "<C-c>", "<Esc>" },
|
},
|
||||||
yank_last = "<C-y>",
|
keymaps = {
|
||||||
scroll_up = "<C-u>",
|
close = { "<C-c>", "<Esc>" },
|
||||||
scroll_down = "<C-d>",
|
yank_last = "<C-y>",
|
||||||
toggle_settings = "<C-o>",
|
scroll_up = "<C-u>",
|
||||||
new_session = "<C-n>",
|
scroll_down = "<C-d>",
|
||||||
cycle_windows = "<Tab>",
|
toggle_settings = "<C-o>",
|
||||||
},
|
new_session = "<C-n>",
|
||||||
})
|
cycle_windows = "<Tab>",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.smart_quit()
|
function M.smart_quit()
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
local buf_windows = vim.call("win_findbuf", bufnr)
|
local buf_windows = vim.call("win_findbuf", bufnr)
|
||||||
local modified = vim.api.nvim_buf_get_option(bufnr, "modified")
|
local modified = vim.api.nvim_buf_get_var(bufnr, "modified")
|
||||||
if modified and #buf_windows == 1 then
|
if modified and #buf_windows == 1 then
|
||||||
vim.ui.input({
|
vim.ui.input({
|
||||||
prompt = "You have unsaved changes. Quit anyway? (y/n) ",
|
prompt = "You have unsaved changes. Quit anyway? (y/n) ",
|
||||||
}, function(input)
|
}, function(input)
|
||||||
if input == "y" then
|
if input == "y" then
|
||||||
vim.cmd("q!")
|
vim.cmd "q!"
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
vim.cmd("q!")
|
vim.cmd "q!"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.isempty(s)
|
function M.isempty(s)
|
||||||
return s == nil or s == ""
|
return s == nil or s == ""
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.get_buf_option(opt)
|
function M.get_buf_option(opt)
|
||||||
local status_ok, buf_option = pcall(vim.api.nvim_buf_get_option, 0, opt)
|
local status_ok, buf_option = pcall(vim.api.nvim_buf_get_var, 0, opt)
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return nil
|
return nil
|
||||||
else
|
else
|
||||||
return buf_option
|
return buf_option
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
function _LIVE_SERVER()
|
function _LIVE_SERVER()
|
||||||
local Terminal = require("toggleterm.terminal").Terminal
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
local live_server = Terminal:new({
|
local live_server = Terminal:new {
|
||||||
cmd = "live-server",
|
cmd = "live-server",
|
||||||
hidden = true,
|
hidden = true,
|
||||||
direction = "tab",
|
direction = "tab",
|
||||||
})
|
}
|
||||||
live_server:toggle()
|
live_server:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
function _CLOSE_BUFFER()
|
function _CLOSE_BUFFER()
|
||||||
local buf = vim.api.nvim_get_current_buf()
|
local buf = vim.api.nvim_get_current_buf()
|
||||||
-- delete current buffer
|
-- delete current buffer
|
||||||
require("bufdelete").bufdelete(buf, true)
|
require("bufdelete").bufdelete(buf, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function _OPEN_ALACRITTY()
|
function _OPEN_ALACRITTY()
|
||||||
-- open alacritty new windows current directory
|
-- open alacritty new windows current directory
|
||||||
vim.cmd("silent !alacritty --working-directory " .. vim.fn.getcwd())
|
vim.cmd("silent !alacritty --working-directory " .. vim.fn.getcwd())
|
||||||
end
|
end
|
||||||
|
|
||||||
local term_opts = { silent = true }
|
local term_opts = { silent = true }
|
||||||
|
@ -151,39 +151,39 @@ keymap("x", "<A-j>", ":move '>+1<CR>gv-gv", opts)
|
||||||
keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts)
|
keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts)
|
||||||
|
|
||||||
local map = function(mode, lhs, rhs, desc)
|
local map = function(mode, lhs, rhs, desc)
|
||||||
if desc then
|
if desc then
|
||||||
desc = desc
|
desc = desc
|
||||||
end
|
end
|
||||||
vim.keymap.set(mode, lhs, rhs, { silent = true, desc = desc, buffer = bufnr, noremap = true })
|
vim.keymap.set(mode, lhs, rhs, { silent = true, desc = desc, buffer = 0, noremap = true })
|
||||||
end
|
end
|
||||||
-- if pcall(require, "dap") then
|
-- if pcall(require, "dap") then
|
||||||
-- modified function keys found with `showkey -a` in the terminal to get key code
|
-- modified function keys found with `showkey -a` in the terminal to get key code
|
||||||
-- run `nvim -V3log +quit` and search through the "Terminal info" in the `log` file for the correct keyname
|
-- run `nvim -V3log +quit` and search through the "Terminal info" in the `log` file for the correct keyname
|
||||||
if vim.fn.has("win32") == 0 then
|
if vim.fn.has "win32" == 0 then
|
||||||
map("n", "<F5>", function()
|
map("n", "<F5>", function()
|
||||||
require("dap").continue()
|
require("dap").continue()
|
||||||
end, "")
|
end, "")
|
||||||
map("n", "<F17>", function()
|
map("n", "<F17>", function()
|
||||||
require("dap").terminate()
|
require("dap").terminate()
|
||||||
end, "") -- Shift+F5
|
end, "") -- Shift+F5
|
||||||
map("n", "<F29>", function()
|
map("n", "<F29>", function()
|
||||||
require("dap").restart_frame()
|
require("dap").restart_frame()
|
||||||
end, "") -- Control+F5
|
end, "") -- Control+F5
|
||||||
map("n", "<F6>", function()
|
map("n", "<F6>", function()
|
||||||
require("dap").pause()
|
require("dap").pause()
|
||||||
end, "")
|
end, "")
|
||||||
map("n", "<F9>", function()
|
map("n", "<F9>", function()
|
||||||
require("dap").toggle_breakpoint()
|
require("dap").toggle_breakpoint()
|
||||||
end, "")
|
end, "")
|
||||||
map("n", "<F10>", function()
|
map("n", "<F10>", function()
|
||||||
require("dap").step_over()
|
require("dap").step_over()
|
||||||
end, "")
|
end, "")
|
||||||
map("n", "<F11>", function()
|
map("n", "<F11>", function()
|
||||||
require("dap").step_into()
|
require("dap").step_into()
|
||||||
end, "")
|
end, "")
|
||||||
map("n", "<F23>", function()
|
map("n", "<F23>", function()
|
||||||
require("dap").step_out()
|
require("dap").step_out()
|
||||||
end, "") -- Shift+F11
|
end, "") -- Shift+F11
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Terminal --
|
-- Terminal --
|
||||||
|
|
|
@ -3,7 +3,7 @@ if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
require("user.lsp.mason")
|
require("user.lsp.mason_cfg")
|
||||||
--require("user.lsp.config") -- ini hanya untuk windows supaya jdtls jalan, kalau pakai linu x remark saja
|
--require("user.lsp.config") -- ini hanya untuk windows supaya jdtls jalan, kalau pakai linu x remark saja
|
||||||
require("user.lsp.handlers").setup()
|
require("user.lsp.handlers").setup()
|
||||||
--require("user.lsp.null-ls")
|
--require("user.lsp.null-lscfg")
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
local servers = {
|
local servers = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
}
|
}
|
||||||
|
|
||||||
local function idxOf(array, value)
|
local function idxOf(array, value)
|
||||||
for i, v in ipairs(array) do
|
for i, v in ipairs(array) do
|
||||||
if v == value then
|
if v == value then
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local mason_install = vim.g.pcode_mason_ensure_installed or {}
|
local mason_install = vim.g.pcode_mason_ensure_installed or {}
|
||||||
for _, client in pairs(mason_install) do
|
for _, client in pairs(mason_install) do
|
||||||
table.insert(servers, client)
|
table.insert(servers, client)
|
||||||
end
|
end
|
||||||
|
|
||||||
local unregis_lsp = vim.g.pcode_unregister_lsp or {}
|
local unregis_lsp = vim.g.pcode_unregister_lsp or {}
|
||||||
local icons = vim.g.pcode_icons.ui
|
local icons = vim.g.pcode_icons.ui
|
||||||
|
|
||||||
local settings = {
|
local settings = {
|
||||||
ui = {
|
ui = {
|
||||||
-- border = "none",
|
-- border = "none",
|
||||||
border = icons.Border,
|
border = icons.Border,
|
||||||
icons = {
|
icons = {
|
||||||
package_pending = icons.DotCircle,
|
package_pending = icons.DotCircle,
|
||||||
package_installed = icons.CheckCircle,
|
package_installed = icons.CheckCircle,
|
||||||
package_uninstalled = icons.BlankCircle,
|
package_uninstalled = icons.BlankCircle,
|
||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
-- Keymap to expand a server in the UI
|
-- Keymap to expand a server in the UI
|
||||||
toggle_server_expand = "<CR>",
|
toggle_server_expand = "<CR>",
|
||||||
-- Keymap to install the server under the current cursor position
|
-- Keymap to install the server under the current cursor position
|
||||||
install_server = "i",
|
install_server = "i",
|
||||||
-- Keymap to reinstall/update the server under the current cursor position
|
-- Keymap to reinstall/update the server under the current cursor position
|
||||||
update_server = "u",
|
update_server = "u",
|
||||||
-- Keymap to check for new version for the server under the current cursor position
|
-- Keymap to check for new version for the server under the current cursor position
|
||||||
check_server_version = "c",
|
check_server_version = "c",
|
||||||
-- Keymap to update all installed servers
|
-- Keymap to update all installed servers
|
||||||
update_all_servers = "U",
|
update_all_servers = "U",
|
||||||
-- Keymap to check which installed servers are outdated
|
-- Keymap to check which installed servers are outdated
|
||||||
check_outdated_servers = "C",
|
check_outdated_servers = "C",
|
||||||
-- Keymap to uninstall a server
|
-- Keymap to uninstall a server
|
||||||
uninstall_server = "X",
|
uninstall_server = "X",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
log_level = vim.log.levels.INFO,
|
log_level = vim.log.levels.INFO,
|
||||||
max_concurrent_installers = 4,
|
max_concurrent_installers = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
require("mason").setup(settings)
|
require("mason").setup(settings)
|
||||||
-- * buka remark ini jika akan menggunakan list serverrs diatas dan remark config dibawah
|
-- * buka remark ini jika akan menggunakan list serverrs diatas dan remark config dibawah
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = servers,
|
ensure_installed = servers,
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
})
|
})
|
||||||
--
|
--
|
||||||
-- * buka remark ini jika ingin menjalankan dengan cara install dan remark config diatas (pilih satu)
|
-- * buka remark ini jika ingin menjalankan dengan cara install dan remark config diatas (pilih satu)
|
||||||
-- require("mason-lspconfig").setup()
|
-- require("mason-lspconfig").setup()
|
||||||
|
|
||||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||||
if not lspconfig_status_ok then
|
if not lspconfig_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local opts = {}
|
local opts = {}
|
||||||
|
|
||||||
require("mason-lspconfig").setup_handlers({
|
require("mason-lspconfig").setup_handlers({
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
local is_skip = false
|
local is_skip = false
|
||||||
local my_index = idxOf(unregis_lsp, server_name)
|
local my_index = idxOf(unregis_lsp, server_name)
|
||||||
if my_index ~= nil then
|
if my_index ~= nil then
|
||||||
is_skip = true
|
is_skip = true
|
||||||
end
|
end
|
||||||
if not is_skip then
|
if not is_skip then
|
||||||
opts = {
|
opts = {
|
||||||
on_attach = require("user.lsp.handlers").on_attach,
|
on_attach = require("user.lsp.handlers").on_attach,
|
||||||
capabilities = require("user.lsp.handlers").capabilities,
|
capabilities = require("user.lsp.handlers").capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
server_name = vim.split(server_name, "@")[1]
|
server_name = vim.split(server_name, "@")[1]
|
||||||
|
|
||||||
local require_ok, conf_opts = pcall(require, "user.lsp.settings." .. server_name)
|
local require_ok, conf_opts = pcall(require, "user.lsp.settings." .. server_name)
|
||||||
if require_ok then
|
if require_ok then
|
||||||
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
||||||
end
|
end
|
||||||
lspconfig[server_name].setup(opts)
|
lspconfig[server_name].setup(opts)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
-- Next, you can provide targeted overrides for specific servers.
|
-- Next, you can provide targeted overrides for specific servers.
|
||||||
-- ["rust_analyzer"] = function()
|
-- ["rust_analyzer"] = function()
|
||||||
-- require("rust-tools").setup({})
|
-- require("rust-tools").setup({})
|
||||||
-- end,
|
-- end,
|
||||||
-- ["lua_ls"] = function()
|
-- ["lua_ls"] = function()
|
||||||
-- lspconfig.sumneko_lua.setup({
|
-- lspconfig.sumneko_lua.setup({
|
||||||
-- settings = {
|
-- settings = {
|
||||||
-- Lua = {
|
-- Lua = {
|
||||||
-- diagnostics = {
|
-- diagnostics = {
|
||||||
-- globals = { "vim" },
|
-- globals = { "vim" },
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- })
|
-- })
|
||||||
-- end,
|
-- end,
|
||||||
})
|
})
|
|
@ -1,84 +1,84 @@
|
||||||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
||||||
if not null_ls_status_ok then
|
if not null_ls_status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||||
local formatting = null_ls.builtins.formatting
|
local formatting = null_ls.builtins.formatting
|
||||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||||
local diagnostics = null_ls.builtins.diagnostics
|
local diagnostics = null_ls.builtins.diagnostics
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
|
|
||||||
local sources = {}
|
local sources = {}
|
||||||
local ensure_installed = {}
|
local ensure_installed = {}
|
||||||
|
|
||||||
local data_ok, data_sources = pcall(require, "custom.null-ls")
|
local data_ok, data_sources = pcall(require, "custom.null-ls")
|
||||||
if data_ok then
|
if data_ok then
|
||||||
for _, cfg in pairs(data_sources.sources) do
|
for _, cfg in pairs(data_sources.sources) do
|
||||||
table.insert(sources, cfg)
|
table.insert(sources, cfg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- load data null-ls
|
-- load data null-ls
|
||||||
local nullls_data = vim.g.pcode_null_ls_ensure_installed or {}
|
local nullls_data = vim.g.pcode_null_ls_ensure_installed or {}
|
||||||
for _, nullls in pairs(nullls_data) do
|
for _, nullls in pairs(nullls_data) do
|
||||||
table.insert(ensure_installed, nullls)
|
table.insert(ensure_installed, nullls)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mason_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
local mason_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
||||||
if mason_ok then
|
if mason_ok then
|
||||||
mason_null_ls.setup({
|
mason_null_ls.setup({
|
||||||
ensure_installed = ensure_installed,
|
ensure_installed = ensure_installed,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local run = 0
|
local run = 0
|
||||||
local frmt = vim.g.pcode_format_on_save or 0
|
local frmt = vim.g.pcode_format_on_save or 0
|
||||||
if frmt == 1 then
|
if frmt == 1 then
|
||||||
run = 1
|
run = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if run == 1 then
|
if run == 1 then
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
debug = false,
|
debug = false,
|
||||||
ensure_installed = ensure_installed,
|
ensure_installed = ensure_installed,
|
||||||
sources = sources,
|
sources = sources,
|
||||||
--sources = {
|
--sources = {
|
||||||
--formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }),
|
--formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }),
|
||||||
--formatting.prettier,
|
--formatting.prettier,
|
||||||
-- formatting.prettierd,
|
-- formatting.prettierd,
|
||||||
-- formatting.black.with({ extra_args = { "--fast" } }),
|
-- formatting.black.with({ extra_args = { "--fast" } }),
|
||||||
-- formatting.stylua,
|
-- formatting.stylua,
|
||||||
-- formatting.eslint_d,
|
-- formatting.eslint_d,
|
||||||
-- formatting.google_java_format,
|
-- formatting.google_java_format,
|
||||||
-- formatting.phpcbf,
|
-- formatting.phpcbf,
|
||||||
-- formatting.clang_format,
|
-- formatting.clang_format,
|
||||||
-- diagnostics.flake8
|
-- diagnostics.flake8
|
||||||
-- diagnostics.eslint_d,
|
-- diagnostics.eslint_d,
|
||||||
--},
|
--},
|
||||||
|
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
--if client.resolved_capabilities.document_formatting then
|
--if client.resolved_capabilities.document_formatting then
|
||||||
--vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.format{async=true}")
|
--vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.format{async=true}")
|
||||||
--end
|
--end
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
-- vim.lsp.buf.formatting_sync()
|
-- vim.lsp.buf.formatting_sync()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
debug = false,
|
debug = false,
|
||||||
ensure_installed = ensure_installed,
|
ensure_installed = ensure_installed,
|
||||||
sources = sources,
|
sources = sources,
|
||||||
})
|
})
|
||||||
end
|
end
|
|
@ -23,7 +23,6 @@ startify.section.top_buttons.val = {
|
||||||
startify.button("t", " Find text", ":Telescope live_grep <CR>"),
|
startify.button("t", " Find text", ":Telescope live_grep <CR>"),
|
||||||
startify.button("c", " Configuration", ":e $MYVIMRC <CR>"),
|
startify.button("c", " Configuration", ":e $MYVIMRC <CR>"),
|
||||||
startify.button("z", " Lazy", ":Lazy<CR>"),
|
startify.button("z", " Lazy", ":Lazy<CR>"),
|
||||||
-- startify.button("q", " Quit Neovim", ":qa<CR>"),
|
|
||||||
}
|
}
|
||||||
-- disable MRU
|
-- disable MRU
|
||||||
startify.section.mru.val = { { type = "padding", val = 4 } }
|
startify.section.mru.val = { { type = "padding", val = 4 } }
|
||||||
|
@ -70,6 +69,7 @@ vim.api.nvim_create_autocmd({ "User" }, {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
-- ignore filetypes in MRU
|
-- ignore filetypes in MRU
|
||||||
|
local default_mru_ignore = {}
|
||||||
startify.mru_opts.ignore = function(path, ext)
|
startify.mru_opts.ignore = function(path, ext)
|
||||||
return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext))
|
return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext))
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,151 +1,157 @@
|
||||||
local active = true
|
local active = true
|
||||||
local icons = vim.g.pcode_icons
|
local icons = vim.g.pcode_icons
|
||||||
local excludes = function()
|
local excludes = function()
|
||||||
return vim.tbl_contains({
|
return vim.tbl_contains({
|
||||||
"help",
|
"help",
|
||||||
"startify",
|
"startify",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
"packer",
|
"packer",
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
"neogitstatus",
|
"neogitstatus",
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
"Trouble",
|
"Trouble",
|
||||||
"alpha",
|
"alpha",
|
||||||
"lir",
|
"lir",
|
||||||
"Outline",
|
"Outline",
|
||||||
"spectre_panel",
|
"spectre_panel",
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"DressingSelect",
|
"DressingSelect",
|
||||||
"Jaq",
|
"Jaq",
|
||||||
"harpoon",
|
"harpoon",
|
||||||
"dap-repl",
|
"dap-repl",
|
||||||
"dap-terminal",
|
"dap-terminal",
|
||||||
"dapui_console",
|
"dapui_console",
|
||||||
"dapui_hover",
|
"dapui_hover",
|
||||||
"lab",
|
"lab",
|
||||||
"notify",
|
"notify",
|
||||||
"noice",
|
"noice",
|
||||||
"",
|
"",
|
||||||
} or {}, vim.bo.filetype)
|
} or {}, vim.bo.filetype)
|
||||||
end
|
end
|
||||||
|
|
||||||
local get_filename = function()
|
local get_filename = function()
|
||||||
local filename = vim.fn.expand("%:t")
|
local filename = vim.fn.expand "%:t"
|
||||||
local extension = vim.fn.expand("%:e")
|
local extension = vim.fn.expand "%:e"
|
||||||
local f = require("user.functions")
|
local f = require "user.functions"
|
||||||
|
|
||||||
if not f.isempty(filename) then
|
if not f.isempty(filename) then
|
||||||
local file_icon, hl_group = require("nvim-web-devicons").get_icon(filename, extension, { default = true })
|
local file_icon, hl_group = require("nvim-web-devicons").get_icon(filename, extension, { default = true })
|
||||||
|
|
||||||
if f.isempty(file_icon) then
|
if f.isempty(file_icon) then
|
||||||
file_icon = icons.kind.File
|
file_icon = icons.kind.File
|
||||||
end
|
end
|
||||||
|
|
||||||
local buf_ft = vim.bo.filetype
|
local buf_ft = vim.bo.filetype
|
||||||
|
|
||||||
if buf_ft == "dapui_breakpoints" then
|
if buf_ft == "dapui_breakpoints" then
|
||||||
file_icon = icons.ui.Bug
|
file_icon = icons.ui.Bug
|
||||||
end
|
end
|
||||||
|
|
||||||
if buf_ft == "dapui_stacks" then
|
if buf_ft == "dapui_stacks" then
|
||||||
file_icon = icons.ui.Stacks
|
file_icon = icons.ui.Stacks
|
||||||
end
|
end
|
||||||
|
|
||||||
if buf_ft == "dapui_scopes" then
|
if buf_ft == "dapui_scopes" then
|
||||||
file_icon = icons.ui.Scopes
|
file_icon = icons.ui.Scopes
|
||||||
end
|
end
|
||||||
|
|
||||||
if buf_ft == "dapui_watches" then
|
if buf_ft == "dapui_watches" then
|
||||||
file_icon = icons.ui.Watches
|
file_icon = icons.ui.Watches
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if buf_ft == "dapui_console" then
|
-- if buf_ft == "dapui_console" then
|
||||||
-- file_icon = lvim.icons.ui.DebugConsole
|
-- file_icon = lvim.icons.ui.DebugConsole
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
local navic_text = vim.api.nvim_get_hl_by_name("Normal", true)
|
-- local navic_text = vim.api.nvim_get_hl_by_name("Normal", true)
|
||||||
vim.api.nvim_set_hl(0, "Winbar", { fg = navic_text.foreground })
|
-- vim.api.nvim_set_hl(0, "Winbar", { fg = navic_text.foreground })
|
||||||
|
-- Dapatkan definisi highlight group "Normal"
|
||||||
|
local normal_hl = vim.fn.getcompletion("Normal", "highlight")[1]
|
||||||
|
-- Dapatkan warna foreground dan background
|
||||||
|
local fg_color = vim.fn.synIDattr(vim.fn.hlID(normal_hl), "fg")
|
||||||
|
local bg_color = vim.fn.synIDattr(vim.fn.hlID(normal_hl), "bg")
|
||||||
|
vim.api.nvim_set_hl(0, "Winbar", { fg = fg_color, bg = bg_color })
|
||||||
|
|
||||||
return " " .. "%#" .. hl_group .. "#" .. file_icon .. "%*" .. " " .. "%#Winbar#" .. filename .. "%*"
|
return " " .. "%#" .. hl_group .. "#" .. file_icon .. "%*" .. " " .. "%#Winbar#" .. filename .. "%*"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local get_gps = function()
|
local get_gps = function()
|
||||||
local status_gps_ok, gps = pcall(require, "nvim-navic")
|
local status_gps_ok, gps = pcall(require, "nvim-navic")
|
||||||
if not status_gps_ok then
|
if not status_gps_ok then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local status_ok, gps_location = pcall(gps.get_location, {})
|
local status_ok, gps_location = pcall(gps.get_location, {})
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
if not gps.is_available() or gps_location == "error" then
|
if not gps.is_available() or gps_location == "error" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
if not require("user.functions").isempty(gps_location) then
|
if not require("user.functions").isempty(gps_location) then
|
||||||
return "%#NavicSeparator#" .. icons.ui.ChevronRight .. "%* " .. gps_location
|
return "%#NavicSeparator#" .. icons.ui.ChevronRight .. "%* " .. gps_location
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local get_winbar = function()
|
local get_winbar = function()
|
||||||
if excludes() then
|
if excludes() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local f = require("user.functions")
|
local f = require "user.functions"
|
||||||
local value = get_filename()
|
local value = get_filename()
|
||||||
|
|
||||||
local gps_added = false
|
local gps_added = false
|
||||||
if not f.isempty(value) then
|
if not f.isempty(value) then
|
||||||
local gps_value = get_gps()
|
local gps_value = get_gps()
|
||||||
value = value .. " " .. gps_value
|
value = value .. " " .. gps_value
|
||||||
if not f.isempty(gps_value) then
|
if not f.isempty(gps_value) then
|
||||||
gps_added = true
|
gps_added = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not f.isempty(value) and f.get_buf_option("mod") then
|
if not f.isempty(value) and f.get_buf_option "mod" then
|
||||||
-- TODO: replace with circle
|
-- TODO: replace with circle
|
||||||
local mod = "%#LspCodeLens#" .. icons.ui.Circle .. "%*"
|
local mod = "%#LspCodeLens#" .. icons.ui.Circle .. "%*"
|
||||||
if gps_added then
|
if gps_added then
|
||||||
value = value .. " " .. mod
|
value = value .. " " .. mod
|
||||||
else
|
else
|
||||||
value = value .. mod
|
value = value .. mod
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local num_tabs = #vim.api.nvim_list_tabpages()
|
local num_tabs = #vim.api.nvim_list_tabpages()
|
||||||
|
|
||||||
if num_tabs > 1 and not f.isempty(value) then
|
if num_tabs > 1 and not f.isempty(value) then
|
||||||
local tabpage_number = tostring(vim.api.nvim_tabpage_get_number(0))
|
local tabpage_number = tostring(vim.api.nvim_tabpage_get_number(0))
|
||||||
value = value .. "%=" .. tabpage_number .. "/" .. tostring(num_tabs)
|
value = value .. "%=" .. tabpage_number .. "/" .. tostring(num_tabs)
|
||||||
end
|
end
|
||||||
|
|
||||||
local status_ok, _ = pcall(vim.api.nvim_set_option_value, "winbar", value, { scope = "local" })
|
local status_ok, _ = pcall(vim.api.nvim_set_option_value, "winbar", value, { scope = "local" })
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_augroup("_winbar", {})
|
vim.api.nvim_create_augroup("_winbar", {})
|
||||||
if vim.fn.has("nvim-0.8") == 1 then
|
if vim.fn.has "nvim-0.8" == 1 then
|
||||||
vim.api.nvim_create_autocmd(
|
vim.api.nvim_create_autocmd(
|
||||||
{ "CursorHoldI", "CursorHold", "BufWinEnter", "BufFilePost", "InsertEnter", "BufWritePost", "TabClosed" },
|
{ "CursorHoldI", "CursorHold", "BufWinEnter", "BufFilePost", "InsertEnter", "BufWritePost", "TabClosed" },
|
||||||
{
|
{
|
||||||
group = "_winbar",
|
group = "_winbar",
|
||||||
callback = function()
|
callback = function()
|
||||||
if active then
|
if active then
|
||||||
local status_ok, _ = pcall(vim.api.nvim_buf_get_var, 0, "lsp_floating_window")
|
local status_ok, _ = pcall(vim.api.nvim_buf_get_var, 0, "lsp_floating_window")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
-- TODO:
|
-- TODO:
|
||||||
get_winbar()
|
get_winbar()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue