mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-26 10:48:40 +02:00
Merge branch 'v2'
This commit is contained in:
commit
d9f7dd2533
15 changed files with 730 additions and 539 deletions
|
@ -4,7 +4,7 @@ require("config.lazy")
|
||||||
require("user.colorscheme")
|
require("user.colorscheme")
|
||||||
require("user.keymaps")
|
require("user.keymaps")
|
||||||
-- require("user.snip")
|
-- require("user.snip")
|
||||||
-- require("core.neovide")
|
require("core.neovide")
|
||||||
require("custom.autocmd")
|
require("custom.autocmd")
|
||||||
require("custom.keymaps")
|
require("custom.keymaps")
|
||||||
-- require("user.nvim-tree")
|
-- require("user.nvim-tree")
|
||||||
|
@ -17,5 +17,5 @@ require("custom.keymaps")
|
||||||
-- require("user.chat_gpt")
|
-- require("user.chat_gpt")
|
||||||
-- vim.cmd("colorscheme one_monokai")
|
-- vim.cmd("colorscheme one_monokai")
|
||||||
-- vim.cmd("colorscheme onedark")
|
-- vim.cmd("colorscheme onedark")
|
||||||
-- vim.cmd("colorscheme github_dark_dimmed")
|
vim.cmd("colorscheme github_dark_dimmed")
|
||||||
-- vim.cmd("colorscheme github_dark_high_contrast")
|
-- vim.cmd("colorscheme github_dark_high_contrast")
|
||||||
|
|
|
@ -1,14 +1,35 @@
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
vim.g.neovide_input_use_logo = 1 -- enable use of the logo (cmd) key
|
vim.g.neovide_input_use_logo = 1 -- enable use of the logo (cmd) key
|
||||||
vim.keymap.set("n", "<c-s>", ":w<CR>") -- Save
|
vim.keymap.set("n", "<c-s>", ":w<CR>", opts) -- Save
|
||||||
vim.keymap.set("v", "<c-c>", '"+y') -- Copy
|
vim.keymap.set("v", "<c-c>", '"+y', opts) -- Copy
|
||||||
vim.keymap.set("n", "<c-v>", '"+P') -- Paste normal mode
|
vim.keymap.set("n", "<c-v>", '"+P', opts) -- Paste normal mode
|
||||||
vim.keymap.set("v", "<c-v>", '"+P') -- Paste visual mode
|
vim.keymap.set("v", "<c-v>", '"+P', opts) -- Paste visual mode
|
||||||
vim.keymap.set("c", "<c-v>", "<C-R>+") -- Paste command mode
|
vim.keymap.set("x", "<c-v>", '"+P', opts) -- Paste visual mode
|
||||||
vim.keymap.set("i", "<c-v>", '<ESC>l"+Pli') -- Paste insert mode
|
vim.keymap.set("c", "<c-v>", "<C-R>+", opts) -- Paste command mode
|
||||||
vim.keymap.set("n", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>")
|
vim.keymap.set("c", "<c-v>", '"+P', opts) -- Paste command mode
|
||||||
vim.keymap.set("i", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>")
|
vim.keymap.set("i", "<c-v>", '<ESC>l"+Pli', opts) -- Paste insert mode
|
||||||
vim.keymap.set("v", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>")
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"<c-/>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
vim.keymap.set(
|
||||||
|
"i",
|
||||||
|
"<c-/>",
|
||||||
|
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>",
|
||||||
|
opts
|
||||||
|
)
|
||||||
|
vim.keymap.set("v", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
|
||||||
|
|
||||||
|
-- vim.keymap.set("n", "<C-s>", ":w<CR>", opts) -- Save
|
||||||
|
-- vim.keymap.set("v", "<C-c>", '"+y', opts) -- Copy
|
||||||
|
-- vim.keymap.set("n", "<C-v>", '"+P', opts) -- Paste normal mode
|
||||||
|
-- vim.keymap.set("v", "<C-v>", '"+P', opts) -- Paste visual mode
|
||||||
|
-- vim.keymap.set("c", "<C-v>", "<C-R>+", opts) -- Paste command mode
|
||||||
|
-- vim.keymap.set("i", "<C-v>", '<ESC>l"+Pli', opts) -- Paste insert mode
|
||||||
|
-- vim.keymap.set("t", "<C-v>", '<C-\\><C-n>"+Pi', opts)
|
||||||
|
|
||||||
vim.o.guifont = "Hasklug_Nerd_Font:h15"
|
vim.o.guifont = "Hasklug_Nerd_Font:h15"
|
||||||
vim.g.neovide_padding_top = 0
|
vim.g.neovide_padding_top = 0
|
||||||
|
@ -17,9 +38,8 @@ if vim.g.neovide then
|
||||||
vim.g.neovide_padding_left = 1
|
vim.g.neovide_padding_left = 1
|
||||||
|
|
||||||
-- config for transparent
|
-- config for transparent
|
||||||
--vim.g.neovide_transparency = 0.8
|
|
||||||
vim.g.neovide_hide_mouse_when_typing = false
|
|
||||||
vim.g.neovide_transparency = 1
|
vim.g.neovide_transparency = 1
|
||||||
|
vim.g.neovide_hide_mouse_when_typing = false
|
||||||
vim.g.neovide_underline_automatic_scaling = false
|
vim.g.neovide_underline_automatic_scaling = false
|
||||||
vim.g.neovide_refresh_rate_idle = 5
|
vim.g.neovide_refresh_rate_idle = 5
|
||||||
vim.g.neovide_no_idle = true
|
vim.g.neovide_no_idle = true
|
||||||
|
@ -42,11 +62,19 @@ if vim.g.neovide then
|
||||||
vim.g.neovide_scale_factor = 1
|
vim.g.neovide_scale_factor = 1
|
||||||
vim.opt.cmdheight = 0
|
vim.opt.cmdheight = 0
|
||||||
vim.opt.spell = false
|
vim.opt.spell = false
|
||||||
|
|
||||||
|
vim.g.neovide_window_blurred = true
|
||||||
|
vim.g.neovide_floating_blur_amount_x = 2.0
|
||||||
|
vim.g.neovide_floating_blur_amount_y = 2.0
|
||||||
|
vim.g.neovide_floating_shadow = false
|
||||||
|
vim.g.neovide_floating_z_height = 10
|
||||||
|
vim.g.neovide_light_angle_degrees = 45
|
||||||
|
vim.g.neovide_light_radius = 5
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Allow clipboard copy paste in neovim
|
-- -- Allow clipboard copy paste in neovim
|
||||||
vim.g.neovide_input_use_logo = 1
|
-- vim.g.neovide_input_use_logo = 1
|
||||||
vim.api.nvim_set_keymap("", "<c-v>", "+p<CR>", { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap("", "<c-v>", "+p<CR>", { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap("!", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap("!", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap("t", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap("t", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap("v", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap("v", "<c-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
|
|
|
@ -3,3 +3,9 @@ local keymap = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
keymap("n", "]h", '<cmd>lua print("Testing")<cr>', opts)
|
keymap("n", "]h", '<cmd>lua print("Testing")<cr>', opts)
|
||||||
keymap("n", "f", "<cmd>NvimTreeFindFileToggle<cr><cr><Up>", opts)
|
keymap("n", "f", "<cmd>NvimTreeFindFileToggle<cr><cr><Up>", opts)
|
||||||
|
|
||||||
|
-- Allow clipboard copy paste in neovim
|
||||||
|
vim.api.nvim_set_keymap("", "<C-v>", "+p<CR>", { noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("!", "<C-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("t", "<C-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("v", "<C-v>", "<C-R>+", { noremap = true, silent = true })
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
|
branch = "main",
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
local status_ok, bufferline = pcall(require, "bufferline")
|
local status_ok, bufferline = pcall(require, "bufferline")
|
||||||
|
|
|
@ -1,100 +1,109 @@
|
||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "navarasu/onedark.nvim",
|
"navarasu/onedark.nvim",
|
||||||
-- enabled = false,
|
enabled = false,
|
||||||
-- },
|
},
|
||||||
-- {
|
{
|
||||||
-- "projekt0n/github-nvim-theme",
|
"projekt0n/github-nvim-theme",
|
||||||
-- lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||||
-- priority = 1000, -- make sure to load this before all the other start plugins
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
-- config = function()
|
config = function()
|
||||||
-- local is_transparent = false
|
local is_transparent = false
|
||||||
-- local palette = require("github-theme.palette").load("github_dark_dimmed")
|
local palette = require("github-theme.palette").load("github_dark_dimmed")
|
||||||
-- require("github-theme").setup({
|
require("github-theme").setup({
|
||||||
-- options = {
|
options = {
|
||||||
-- -- Compiled file's destination location
|
-- Compiled file's destination location
|
||||||
-- compile_path = vim.fn.stdpath("cache") .. "/github-theme",
|
compile_path = vim.fn.stdpath("cache") .. "/github-theme",
|
||||||
-- compile_file_suffix = "_compiled", -- Compiled file suffix
|
compile_file_suffix = "_compiled", -- Compiled file suffix
|
||||||
-- hide_end_of_buffer = true, -- Hide the '~' character at the end of the buffer for a cleaner look
|
hide_end_of_buffer = true, -- Hide the '~' character at the end of the buffer for a cleaner look
|
||||||
-- hide_nc_statusline = true, -- Override the underline style for non-active statuslines
|
hide_nc_statusline = true, -- Override the underline style for non-active statuslines
|
||||||
-- transparent = is_transparent, -- Disable setting background
|
transparent = is_transparent, -- Disable setting background
|
||||||
-- terminal_colors = true, -- Set terminal colors (vim.g.terminal_color_*) used in `:terminal`
|
terminal_colors = true, -- Set terminal colors (vim.g.terminal_color_*) used in `:terminal`
|
||||||
-- dim_inactive = false, -- Non focused panes set to alternative background
|
dim_inactive = false, -- Non focused panes set to alternative background
|
||||||
-- module_default = true, -- Default enable value for modules
|
module_default = true, -- Default enable value for modules
|
||||||
-- styles = { -- Style to be applied to different syntax groups
|
styles = { -- Style to be applied to different syntax groups
|
||||||
-- comments = "italic", -- Value is any valid attr-list value `:help attr-list`
|
comments = "italic", -- Value is any valid attr-list value `:help attr-list`
|
||||||
-- functions = "italic",
|
functions = "italic",
|
||||||
-- keywords = "NONE",
|
keywords = "NONE",
|
||||||
-- variables = "NONE",
|
variables = "NONE",
|
||||||
-- conditionals = "NONE",
|
conditionals = "NONE",
|
||||||
-- constants = "NONE",
|
constants = "NONE",
|
||||||
-- numbers = "NONE",
|
numbers = "NONE",
|
||||||
-- operators = "NONE",
|
operators = "NONE",
|
||||||
-- strings = "NONE",
|
strings = "NONE",
|
||||||
-- types = "NONE",
|
types = "NONE",
|
||||||
-- },
|
},
|
||||||
-- inverse = { -- Inverse highlight for different types
|
inverse = { -- Inverse highlight for different types
|
||||||
-- match_paren = false,
|
match_paren = false,
|
||||||
-- visual = false,
|
visual = false,
|
||||||
-- search = false,
|
search = false,
|
||||||
-- },
|
},
|
||||||
-- darken = { -- Darken floating windows and sidebar-like windows
|
darken = { -- Darken floating windows and sidebar-like windows
|
||||||
-- floats = false,
|
floats = false,
|
||||||
-- sidebars = {
|
sidebars = {
|
||||||
-- enabled = true,
|
enabled = true,
|
||||||
-- list = {}, -- Apply dark background to specific windows
|
list = {}, -- Apply dark background to specific windows
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- modules = { -- List of various plugins and additional options
|
modules = { -- List of various plugins and additional options
|
||||||
-- -- ...
|
-- ...
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- palettes = {
|
palettes = {
|
||||||
-- github_dark_dimmed = {
|
github_dark_dimmed = {
|
||||||
-- bg0 = is_transparent and "NONE" or "bg1",
|
bg0 = is_transparent and "NONE" or "bg1",
|
||||||
-- bg1 = is_transparent and "NONE" or "bg",
|
bg1 = is_transparent and "NONE" or "bg",
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- specs = {},
|
specs = {},
|
||||||
-- groups = {
|
groups = {
|
||||||
-- all = {
|
all = {
|
||||||
-- illuminatedWord = { bg = "#3b4261" },
|
illuminatedWord = { bg = "#3b4261" },
|
||||||
-- illuminatedCurWord = { bg = "#3b4261" },
|
illuminatedCurWord = { bg = "#3b4261" },
|
||||||
-- IlluminatedWordText = { bg = "#3b4261" },
|
IlluminatedWordText = { bg = "#3b4261" },
|
||||||
-- IlluminatedWordRead = { bg = "#3b4261" },
|
IlluminatedWordRead = { bg = "#3b4261" },
|
||||||
-- IlluminatedWordWrite = { bg = "#3b4261" },
|
IlluminatedWordWrite = { bg = "#3b4261" },
|
||||||
-- ["@tag.attribute"] = { fg = "#77bdfb", style = "italic" },
|
["@tag.attribute"] = { fg = "#77bdfb", style = "italic" },
|
||||||
-- ["@text.uri"] = { fg = palette.const, style = "italic" },
|
["@text.uri"] = { fg = palette.const, style = "italic" },
|
||||||
-- ["@keyword.return"] = { fg = "#fa7970", style = "italic" },
|
["@keyword.return"] = { fg = "#fa7970", style = "italic" },
|
||||||
-- -- ["@tag.attribute.html"] = { fg = "#faa356", style = "italic" },
|
-- ["@tag.attribute.html"] = { fg = "#faa356", style = "italic" },
|
||||||
-- -- ["@operator.html"] = { fg = "#faa356" },
|
-- ["@operator.html"] = { fg = "#faa356" },
|
||||||
-- -- ["@tag.html"] = { fg = "#fa7970" },
|
-- ["@tag.html"] = { fg = "#fa7970" },
|
||||||
-- -- ["@tag.delimiter.html"] = { fg = "#faa356" },
|
-- ["@tag.delimiter.html"] = { fg = "#faa356" },
|
||||||
-- ["@tag.javascript"] = { fg = "#faa356" },
|
-- ["@tag.javascript"] = { fg = "#faa356" },
|
||||||
|
-- ["@tag.javascript"] = { fg = "#8ddb8c" },
|
||||||
|
-- ["@tag.tsx"] = { fg = "#8ddb8c" },
|
||||||
|
-- ["@tag.delimiter.javascript"] = { fg = "fg1" },
|
||||||
-- ["@tag.tsx"] = { fg = "#faa356" },
|
-- ["@tag.tsx"] = { fg = "#faa356" },
|
||||||
-- },
|
["@lsp.type.parameter"] = { fg = "#faa356" },
|
||||||
-- github_dark_high_contrast = {
|
["@property.lua"] = { fg = "#91cbff", bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- NvimTreeSpecialFile = { fg = "#faa356", style = "italic" },
|
["@lsp.type.property.lua"] = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- },
|
["@lsp.type.variable.lua"] = { fg = "#91cbff", bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- github_dark_dimmed = {
|
},
|
||||||
-- -- As with specs and palettes, a specific style's value will be used over the `all`'s value.
|
github_dark_high_contrast = {
|
||||||
-- NvimTreeNormal = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" },
|
NvimTreeSpecialFile = { fg = "#faa356", style = "italic" },
|
||||||
-- NvimTreeSpecialFile = { fg = "#faa356", style = "italic" },
|
},
|
||||||
-- NvimTreeIndentMarker = { fg = "#3E4450" },
|
github_dark_dimmed = {
|
||||||
-- BufferLineFill = { bg = is_transparent and "NONE" or "bg1" },
|
-- As with specs and palettes, a specific style's value will be used over the `all`'s value.
|
||||||
-- BufferLineUnfocusedFill = { bg = is_transparent and "NONE" or "bg1" },
|
NvimTreeNormal = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- LualineNormal = { bg = is_transparent and "NONE" or "bg1" },
|
NvimTreeSpecialFile = { fg = "#faa356", style = "italic" },
|
||||||
-- StatusLine = { bg = is_transparent and "NONE" or "bg1" },
|
NvimTreeIndentMarker = { fg = "#3E4450" },
|
||||||
-- StatusLineTerm = { bg = is_transparent and "NONE" or "bg1" },
|
BufferLineFill = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- Pmenu = { bg = is_transparent and "NONE" or "bg1" },
|
BufferLineUnfocusedFill = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- PmenuSel = { link = "CursorLine" },
|
LualineNormal = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- WhichKeyFloat = { bg = is_transparent and "NONE" or "bg1" },
|
StatusLine = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- LazyNormal = { bg = is_transparent and "NONE" or "bg1" },
|
StatusLineTerm = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- LazyBackground = { bg = is_transparent and "NONE" or "bg1" },
|
Pmenu = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- NormalSB = { fg = "fg1", bg = "bg1" }, -- normal text
|
PmenuSel = { link = "CursorLine" },
|
||||||
-- },
|
WhichKeyFloat = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- },
|
LazyNormal = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- })
|
LazyBackground = { bg = is_transparent and "NONE" or "bg1" },
|
||||||
-- end,
|
NormalSB = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" }, -- normal text
|
||||||
-- },
|
NormalFloat = { fg = "fg1", bg = is_transparent and "NONE" or "bg1" },
|
||||||
|
IblIndent = { fg = "#3E4450" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
240
lua/custom/plugins/lualine_github.lua
Normal file
240
lua/custom/plugins/lualine_github.lua
Normal file
|
@ -0,0 +1,240 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
local hide_in_width = function()
|
||||||
|
return vim.fn.winwidth(0) > 80
|
||||||
|
end
|
||||||
|
local icons = require("user.icons")
|
||||||
|
|
||||||
|
local getLeftSubstring = function(word, length)
|
||||||
|
if #word > length then
|
||||||
|
return string.sub(word, 1, length) .. "..."
|
||||||
|
else
|
||||||
|
return word
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- start for lsp
|
||||||
|
local list_registered_providers_names = function(filetype)
|
||||||
|
local s = require("null-ls.sources")
|
||||||
|
local available_sources = s.get_available(filetype)
|
||||||
|
local registered = {}
|
||||||
|
for _, source in ipairs(available_sources) do
|
||||||
|
for method in pairs(source.methods) do
|
||||||
|
registered[method] = registered[method] or {}
|
||||||
|
table.insert(registered[method], source.name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return registered
|
||||||
|
end
|
||||||
|
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
-- for formatter
|
||||||
|
local list_registered = function(filetype)
|
||||||
|
local method = null_ls.methods.FORMATTING
|
||||||
|
local registered_providers = list_registered_providers_names(filetype)
|
||||||
|
return registered_providers[method] or {}
|
||||||
|
end
|
||||||
|
|
||||||
|
--- for linter
|
||||||
|
local alternative_methods = {
|
||||||
|
null_ls.methods.DIAGNOSTICS,
|
||||||
|
null_ls.methods.DIAGNOSTICS_ON_OPEN,
|
||||||
|
null_ls.methods.DIAGNOSTICS_ON_SAVE,
|
||||||
|
}
|
||||||
|
|
||||||
|
local linter_list_registered = function(filetype)
|
||||||
|
local registered_providers = list_registered_providers_names(filetype)
|
||||||
|
local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
||||||
|
return registered_providers[m] or {}
|
||||||
|
end, alternative_methods))
|
||||||
|
|
||||||
|
return providers_for_methods
|
||||||
|
end
|
||||||
|
-- end for lsp
|
||||||
|
|
||||||
|
local lsp_info = {
|
||||||
|
function()
|
||||||
|
local msg = "LS Inactive"
|
||||||
|
local buf_ft = vim.bo.filetype
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
-- start register
|
||||||
|
local buf_clients = vim.lsp.buf_get_clients()
|
||||||
|
local buf_client_names = {}
|
||||||
|
if next(buf_clients) == nil then
|
||||||
|
-- TODO: clean up this if statement
|
||||||
|
if type(msg) == "boolean" or #msg == 0 then
|
||||||
|
return "LS Inactive"
|
||||||
|
end
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
-- add client
|
||||||
|
for _, client in pairs(buf_clients) do
|
||||||
|
if client.name ~= "null-ls" and client.name ~= "copilot" then
|
||||||
|
table.insert(buf_client_names, client.name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- add formatter
|
||||||
|
local supported_formatters = list_registered(buf_ft)
|
||||||
|
vim.list_extend(buf_client_names, supported_formatters)
|
||||||
|
-- add linter
|
||||||
|
local supported_linters = linter_list_registered(buf_ft)
|
||||||
|
vim.list_extend(buf_client_names, supported_linters)
|
||||||
|
-- decomple
|
||||||
|
local unique_client_names = vim.fn.uniq(buf_client_names)
|
||||||
|
local msg = table.concat(unique_client_names, ", ")
|
||||||
|
return msg
|
||||||
|
end,
|
||||||
|
--icon = " ",
|
||||||
|
icon = icons.ui.Gear .. "",
|
||||||
|
padding = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
local diagnostics = {
|
||||||
|
"diagnostics",
|
||||||
|
sources = { "nvim_diagnostic" },
|
||||||
|
sections = { "error", "warn" },
|
||||||
|
-- symbols = { error = " ", warn = " " },
|
||||||
|
symbols = {
|
||||||
|
error = icons.diagnostics.BoldError .. " ",
|
||||||
|
warn = icons.diagnostics.BoldWarning .. " ",
|
||||||
|
},
|
||||||
|
colored = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
always_visible = false,
|
||||||
|
}
|
||||||
|
|
||||||
|
local diff = {
|
||||||
|
"diff",
|
||||||
|
colored = true,
|
||||||
|
-- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
|
||||||
|
symbols = {
|
||||||
|
added = icons.git.LineAdded .. " ",
|
||||||
|
modified = icons.git.LineModified .. " ",
|
||||||
|
removed = icons.git.LineRemoved .. " ",
|
||||||
|
}, -- changes diff symbols
|
||||||
|
cond = hide_in_width,
|
||||||
|
}
|
||||||
|
|
||||||
|
local spaces = function()
|
||||||
|
-- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||||
|
return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||||
|
end
|
||||||
|
|
||||||
|
local mode = {
|
||||||
|
"mode",
|
||||||
|
padding = 1,
|
||||||
|
separator = { left = " " },
|
||||||
|
-- right_padding = 3,
|
||||||
|
fmt = function(str)
|
||||||
|
return icons.ui.Neovim .. " " .. str
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
local branch = {
|
||||||
|
"branch",
|
||||||
|
padding = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
local get_branch = function()
|
||||||
|
if vim.b.gitsigns_head ~= nil then
|
||||||
|
return icons.git.Branch2 .. " " .. getLeftSubstring(vim.b.gitsigns_head, 6)
|
||||||
|
else
|
||||||
|
return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local lsp_progress = {}
|
||||||
|
local data_ok, lspprogress = pcall(require, "lsp-progress")
|
||||||
|
if data_ok then
|
||||||
|
lsp_progress = lspprogress.progress
|
||||||
|
end
|
||||||
|
-- stylua: ignore
|
||||||
|
local github=vim.fn.fnamemodify("auto", ":t")
|
||||||
|
local status_ok, _ = pcall(require, "github-theme")
|
||||||
|
if status_ok then
|
||||||
|
local C = require("github-theme.lib.color")
|
||||||
|
local config = require("github-theme.config").options
|
||||||
|
local s = require("github-theme.spec").load("github_dark_dimmed")
|
||||||
|
local p = s.palette
|
||||||
|
local tbg = config.transparent and "NONE" or s.bg0
|
||||||
|
|
||||||
|
local function blend(color, a)
|
||||||
|
return C(s.bg1):blend(C(color), a):to_css()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Create lualine group colors for github-theme
|
||||||
|
---@param color string
|
||||||
|
local tint = function(color)
|
||||||
|
return {
|
||||||
|
a = { bg = color, fg = s.bg1 },
|
||||||
|
b = { bg = blend(color, 0.2), fg = blend(color, 0.8) },
|
||||||
|
c = { bg = "NONE", fg = blend(color, 0.60) },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local inactive_hi = { bg = tbg, fg = blend(s.fg1, 0.3) }
|
||||||
|
github = {
|
||||||
|
normal = tint(p.blue.base),
|
||||||
|
insert = tint(p.green.base),
|
||||||
|
command = tint(p.magenta.bright),
|
||||||
|
visual = tint(p.yellow.base),
|
||||||
|
replace = tint(p.red.base),
|
||||||
|
terminal = tint(p.orange),
|
||||||
|
inactive = {
|
||||||
|
a = inactive_hi,
|
||||||
|
b = inactive_hi,
|
||||||
|
c = inactive_hi,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
theme = github,
|
||||||
|
-- theme = "auto",
|
||||||
|
component_separators = { left = "", right = "" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
disabled_filetypes = {
|
||||||
|
"TelescopePrompt",
|
||||||
|
"packer",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"NvimTree",
|
||||||
|
"Outline",
|
||||||
|
"DressingInput",
|
||||||
|
"toggleterm",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"neo-tree",
|
||||||
|
"startuptime",
|
||||||
|
},
|
||||||
|
always_divide_middle = true,
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
mode,
|
||||||
|
},
|
||||||
|
lualine_b = { get_branch },
|
||||||
|
lualine_c = { lsp_info, diagnostics, lsp_progress },
|
||||||
|
lualine_x = { diff, spaces, "filetype" },
|
||||||
|
lualine_y = { "progress" },
|
||||||
|
lualine_z = {
|
||||||
|
{ "location", separator = { right = " " }, padding = 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = { "filename" },
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = { "location" },
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,248 +1,248 @@
|
||||||
return {
|
return {
|
||||||
{
|
-- {
|
||||||
"nvim-lualine/lualine.nvim",
|
-- "nvim-lualine/lualine.nvim",
|
||||||
event = "InsertEnter",
|
-- event = "InsertEnter",
|
||||||
config = function()
|
-- config = function()
|
||||||
local hide_in_width = function()
|
-- local hide_in_width = function()
|
||||||
return vim.fn.winwidth(0) > 80
|
-- return vim.fn.winwidth(0) > 80
|
||||||
end
|
-- end
|
||||||
local icons = require("user.icons")
|
-- local icons = require("user.icons")
|
||||||
|
--
|
||||||
local getLeftSubstring = function(word, length)
|
-- local getLeftSubstring = function(word, length)
|
||||||
if #word > length then
|
-- if #word > length then
|
||||||
return string.sub(word, 1, length) .. "..."
|
-- return string.sub(word, 1, length) .. "..."
|
||||||
else
|
-- else
|
||||||
return word
|
-- return word
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
-- start for lsp
|
-- -- start for lsp
|
||||||
local list_registered_providers_names = function(filetype)
|
-- local list_registered_providers_names = function(filetype)
|
||||||
local s = require("null-ls.sources")
|
-- local s = require("null-ls.sources")
|
||||||
local available_sources = s.get_available(filetype)
|
-- local available_sources = s.get_available(filetype)
|
||||||
local registered = {}
|
-- local registered = {}
|
||||||
for _, source in ipairs(available_sources) do
|
-- for _, source in ipairs(available_sources) do
|
||||||
for method in pairs(source.methods) do
|
-- for method in pairs(source.methods) do
|
||||||
registered[method] = registered[method] or {}
|
-- registered[method] = registered[method] or {}
|
||||||
table.insert(registered[method], source.name)
|
-- table.insert(registered[method], source.name)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
return registered
|
-- return registered
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
local null_ls = require("null-ls")
|
-- local null_ls = require("null-ls")
|
||||||
-- for formatter
|
-- -- for formatter
|
||||||
local list_registered = function(filetype)
|
-- local list_registered = function(filetype)
|
||||||
local method = null_ls.methods.FORMATTING
|
-- local method = null_ls.methods.FORMATTING
|
||||||
local registered_providers = list_registered_providers_names(filetype)
|
-- local registered_providers = list_registered_providers_names(filetype)
|
||||||
return registered_providers[method] or {}
|
-- return registered_providers[method] or {}
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
--- for linter
|
-- --- for linter
|
||||||
local alternative_methods = {
|
-- local alternative_methods = {
|
||||||
null_ls.methods.DIAGNOSTICS,
|
-- null_ls.methods.DIAGNOSTICS,
|
||||||
null_ls.methods.DIAGNOSTICS_ON_OPEN,
|
-- null_ls.methods.DIAGNOSTICS_ON_OPEN,
|
||||||
null_ls.methods.DIAGNOSTICS_ON_SAVE,
|
-- null_ls.methods.DIAGNOSTICS_ON_SAVE,
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
local linter_list_registered = function(filetype)
|
-- local linter_list_registered = function(filetype)
|
||||||
local registered_providers = list_registered_providers_names(filetype)
|
-- local registered_providers = list_registered_providers_names(filetype)
|
||||||
local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
-- local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
|
||||||
return registered_providers[m] or {}
|
-- return registered_providers[m] or {}
|
||||||
end, alternative_methods))
|
-- end, alternative_methods))
|
||||||
|
--
|
||||||
return providers_for_methods
|
-- return providers_for_methods
|
||||||
end
|
-- end
|
||||||
-- end for lsp
|
-- -- end for lsp
|
||||||
|
--
|
||||||
local lsp_info = {
|
-- local lsp_info = {
|
||||||
function()
|
-- function()
|
||||||
local msg = "LS Inactive"
|
-- local msg = "LS Inactive"
|
||||||
local buf_ft = vim.bo.filetype
|
-- local buf_ft = vim.bo.filetype
|
||||||
local clients = vim.lsp.get_active_clients()
|
-- local clients = vim.lsp.get_active_clients()
|
||||||
-- start register
|
-- -- start register
|
||||||
local buf_clients = vim.lsp.buf_get_clients()
|
-- local buf_clients = vim.lsp.buf_get_clients()
|
||||||
local buf_client_names = {}
|
-- local buf_client_names = {}
|
||||||
if next(buf_clients) == nil then
|
-- if next(buf_clients) == nil then
|
||||||
-- TODO: clean up this if statement
|
-- -- TODO: clean up this if statement
|
||||||
if type(msg) == "boolean" or #msg == 0 then
|
-- if type(msg) == "boolean" or #msg == 0 then
|
||||||
return "LS Inactive"
|
-- return "LS Inactive"
|
||||||
end
|
-- end
|
||||||
return msg
|
-- return msg
|
||||||
end
|
-- end
|
||||||
-- add client
|
-- -- add client
|
||||||
for _, client in pairs(buf_clients) do
|
-- for _, client in pairs(buf_clients) do
|
||||||
if client.name ~= "null-ls" and client.name ~= "copilot" then
|
-- if client.name ~= "null-ls" and client.name ~= "copilot" then
|
||||||
table.insert(buf_client_names, client.name)
|
-- table.insert(buf_client_names, client.name)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
-- add formatter
|
-- -- add formatter
|
||||||
local supported_formatters = list_registered(buf_ft)
|
-- local supported_formatters = list_registered(buf_ft)
|
||||||
vim.list_extend(buf_client_names, supported_formatters)
|
-- vim.list_extend(buf_client_names, supported_formatters)
|
||||||
-- add linter
|
-- -- add linter
|
||||||
local supported_linters = linter_list_registered(buf_ft)
|
-- local supported_linters = linter_list_registered(buf_ft)
|
||||||
vim.list_extend(buf_client_names, supported_linters)
|
-- vim.list_extend(buf_client_names, supported_linters)
|
||||||
-- decomple
|
-- -- decomple
|
||||||
local unique_client_names = vim.fn.uniq(buf_client_names)
|
-- local unique_client_names = vim.fn.uniq(buf_client_names)
|
||||||
local msg = table.concat(unique_client_names, ", ")
|
-- local msg = table.concat(unique_client_names, ", ")
|
||||||
return msg
|
-- return msg
|
||||||
end,
|
-- end,
|
||||||
--icon = " ",
|
-- --icon = " ",
|
||||||
icon = icons.ui.Gear .. "",
|
-- icon = icons.ui.Gear .. "",
|
||||||
padding = 1,
|
-- padding = 1,
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
local diagnostics = {
|
-- local diagnostics = {
|
||||||
"diagnostics",
|
-- "diagnostics",
|
||||||
sources = { "nvim_diagnostic" },
|
-- sources = { "nvim_diagnostic" },
|
||||||
sections = { "error", "warn" },
|
-- sections = { "error", "warn" },
|
||||||
-- symbols = { error = " ", warn = " " },
|
-- -- symbols = { error = " ", warn = " " },
|
||||||
symbols = {
|
-- symbols = {
|
||||||
error = icons.diagnostics.BoldError .. " ",
|
-- error = icons.diagnostics.BoldError .. " ",
|
||||||
warn = icons.diagnostics.BoldWarning .. " ",
|
-- warn = icons.diagnostics.BoldWarning .. " ",
|
||||||
},
|
-- },
|
||||||
colored = true,
|
-- colored = true,
|
||||||
update_in_insert = false,
|
-- update_in_insert = false,
|
||||||
always_visible = false,
|
-- always_visible = false,
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
local diff = {
|
-- local diff = {
|
||||||
"diff",
|
-- "diff",
|
||||||
colored = true,
|
-- colored = true,
|
||||||
-- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
|
-- -- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
|
||||||
symbols = {
|
-- symbols = {
|
||||||
added = icons.git.LineAdded .. " ",
|
-- added = icons.git.LineAdded .. " ",
|
||||||
modified = icons.git.LineModified .. " ",
|
-- modified = icons.git.LineModified .. " ",
|
||||||
removed = icons.git.LineRemoved .. " ",
|
-- removed = icons.git.LineRemoved .. " ",
|
||||||
}, -- changes diff symbols
|
-- }, -- changes diff symbols
|
||||||
cond = hide_in_width,
|
-- cond = hide_in_width,
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
local spaces = function()
|
-- local spaces = function()
|
||||||
-- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
-- -- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||||
return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
-- return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
local mode = {
|
-- local mode = {
|
||||||
"mode",
|
-- "mode",
|
||||||
padding = 1,
|
-- padding = 1,
|
||||||
separator = { left = " " },
|
-- separator = { left = " " },
|
||||||
-- right_padding = 3,
|
-- -- right_padding = 3,
|
||||||
fmt = function(str)
|
-- fmt = function(str)
|
||||||
return icons.ui.Neovim .. " " .. str
|
-- return icons.ui.Neovim .. " " .. str
|
||||||
end,
|
-- end,
|
||||||
}
|
-- }
|
||||||
local branch = {
|
-- local branch = {
|
||||||
"branch",
|
-- "branch",
|
||||||
padding = 1,
|
-- padding = 1,
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
local get_branch = function()
|
-- local get_branch = function()
|
||||||
if vim.b.gitsigns_head ~= nil then
|
-- if vim.b.gitsigns_head ~= nil then
|
||||||
return icons.git.Branch2 .. " " .. getLeftSubstring(vim.b.gitsigns_head, 6)
|
-- return icons.git.Branch2 .. " " .. getLeftSubstring(vim.b.gitsigns_head, 6)
|
||||||
else
|
-- else
|
||||||
return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t")
|
-- return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t")
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
local lsp_progress = {}
|
-- local lsp_progress = {}
|
||||||
local data_ok, lspprogress = pcall(require, "lsp-progress")
|
-- local data_ok, lspprogress = pcall(require, "lsp-progress")
|
||||||
if data_ok then
|
-- if data_ok then
|
||||||
lsp_progress = lspprogress.progress
|
-- lsp_progress = lspprogress.progress
|
||||||
end
|
-- end
|
||||||
-- stylua: ignore
|
-- -- stylua: ignore
|
||||||
local onedark=vim.fn.fnamemodify("auto", ":t")
|
-- local onedark=vim.fn.fnamemodify("auto", ":t")
|
||||||
local is_transparat = true
|
-- local is_transparat = true
|
||||||
local status_ok, onedarkpro = pcall(require, "onedarkpro.helpers")
|
-- local status_ok, onedarkpro = pcall(require, "onedarkpro.helpers")
|
||||||
if status_ok then
|
-- if status_ok then
|
||||||
local colors = onedarkpro.get_colors("onedark")
|
-- local colors = onedarkpro.get_colors("onedark")
|
||||||
|
--
|
||||||
onedark = {
|
-- onedark = {
|
||||||
normal = {
|
-- normal = {
|
||||||
a = { bg = colors.green, fg = colors.bg },
|
-- a = { bg = colors.green, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.green },
|
-- b = { bg = colors.fg_gutter, fg = colors.green },
|
||||||
c = {
|
-- c = {
|
||||||
bg = is_transparat and colors.none or colors.bg_statusline,
|
-- bg = is_transparat and colors.none or colors.bg_statusline,
|
||||||
fg = colors.fg,
|
-- fg = colors.fg,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
|
--
|
||||||
insert = {
|
-- insert = {
|
||||||
a = { bg = colors.blue, fg = colors.bg },
|
-- a = { bg = colors.blue, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.blue },
|
-- b = { bg = colors.fg_gutter, fg = colors.blue },
|
||||||
},
|
-- },
|
||||||
visual = {
|
-- visual = {
|
||||||
a = { bg = colors.yellow, fg = colors.bg },
|
-- a = { bg = colors.yellow, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.yellow },
|
-- b = { bg = colors.fg_gutter, fg = colors.yellow },
|
||||||
},
|
-- },
|
||||||
replace = {
|
-- replace = {
|
||||||
a = { bg = colors.red, fg = colors.bg },
|
-- a = { bg = colors.red, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.red },
|
-- b = { bg = colors.fg_gutter, fg = colors.red },
|
||||||
},
|
-- },
|
||||||
command = {
|
-- command = {
|
||||||
a = { bg = colors.purple, fg = colors.bg },
|
-- a = { bg = colors.purple, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.purple },
|
-- b = { bg = colors.fg_gutter, fg = colors.purple },
|
||||||
},
|
-- },
|
||||||
terminal = {
|
-- terminal = {
|
||||||
a = { bg = colors.cyan, fg = colors.bg },
|
-- a = { bg = colors.cyan, fg = colors.bg },
|
||||||
b = { bg = colors.fg_gutter, fg = colors.cyan },
|
-- b = { bg = colors.fg_gutter, fg = colors.cyan },
|
||||||
},
|
-- },
|
||||||
inactive = {
|
-- inactive = {
|
||||||
a = { bg = colors.bg, fg = colors.blue },
|
-- a = { bg = colors.bg, fg = colors.blue },
|
||||||
b = { bg = colors.bg, fg = colors.fg_gutter_inactive, gui = "bold" },
|
-- b = { bg = colors.bg, fg = colors.fg_gutter_inactive, gui = "bold" },
|
||||||
c = {
|
-- c = {
|
||||||
bg = is_transparat and colors.none or colors.bg,
|
-- bg = is_transparat and colors.none or colors.bg,
|
||||||
fg = colors.fg_gutter_inactive,
|
-- fg = colors.fg_gutter_inactive,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
require("lualine").setup({
|
-- require("lualine").setup({
|
||||||
options = {
|
-- options = {
|
||||||
theme = onedark,
|
-- theme = onedark,
|
||||||
-- theme = "auto",
|
-- -- theme = "auto",
|
||||||
component_separators = { left = "", right = "" },
|
-- component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = "", right = "" },
|
-- section_separators = { left = "", right = "" },
|
||||||
disabled_filetypes = {
|
-- disabled_filetypes = {
|
||||||
"TelescopePrompt",
|
-- "TelescopePrompt",
|
||||||
"packer",
|
-- "packer",
|
||||||
"alpha",
|
-- "alpha",
|
||||||
"dashboard",
|
-- "dashboard",
|
||||||
"NvimTree",
|
-- "NvimTree",
|
||||||
"Outline",
|
-- "Outline",
|
||||||
"DressingInput",
|
-- "DressingInput",
|
||||||
"toggleterm",
|
-- "toggleterm",
|
||||||
"lazy",
|
-- "lazy",
|
||||||
"mason",
|
-- "mason",
|
||||||
"neo-tree",
|
-- "neo-tree",
|
||||||
"startuptime",
|
-- "startuptime",
|
||||||
},
|
-- },
|
||||||
always_divide_middle = true,
|
-- always_divide_middle = true,
|
||||||
},
|
-- },
|
||||||
sections = {
|
-- sections = {
|
||||||
lualine_a = {
|
-- lualine_a = {
|
||||||
mode,
|
-- mode,
|
||||||
},
|
-- },
|
||||||
lualine_b = { get_branch },
|
-- lualine_b = { get_branch },
|
||||||
lualine_c = { lsp_info, diagnostics, lsp_progress },
|
-- lualine_c = { lsp_info, diagnostics, lsp_progress },
|
||||||
lualine_x = { diff, spaces, "filetype" },
|
-- lualine_x = { diff, spaces, "filetype" },
|
||||||
lualine_y = { "progress" },
|
-- lualine_y = { "progress" },
|
||||||
lualine_z = {
|
-- lualine_z = {
|
||||||
{ "location", separator = { right = " " }, padding = 1 },
|
-- { "location", separator = { right = " " }, padding = 1 },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
inactive_sections = {
|
-- inactive_sections = {
|
||||||
lualine_a = { "filename" },
|
-- lualine_a = { "filename" },
|
||||||
lualine_b = {},
|
-- lualine_b = {},
|
||||||
lualine_c = {},
|
-- lualine_c = {},
|
||||||
lualine_x = {},
|
-- lualine_x = {},
|
||||||
lualine_y = {},
|
-- lualine_y = {},
|
||||||
lualine_z = { "location" },
|
-- lualine_z = { "location" },
|
||||||
},
|
-- },
|
||||||
tabline = {},
|
-- tabline = {},
|
||||||
extensions = {},
|
-- extensions = {},
|
||||||
})
|
-- })
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,46 @@
|
||||||
|
local is_neovide = false
|
||||||
|
if vim.g.neovide then
|
||||||
|
is_neovide = true
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- animations
|
-- animations
|
||||||
-- {
|
{
|
||||||
-- "echasnovski/mini.animate",
|
"echasnovski/mini.animate",
|
||||||
-- event = "InsertEnter",
|
event = "BufRead",
|
||||||
-- opts = function()
|
enabled = not is_neovide,
|
||||||
-- -- don't use animate when scrolling with the mouse
|
opts = function()
|
||||||
-- local mouse_scrolled = false
|
-- don't use animate when scrolling with the mouse
|
||||||
-- for _, scroll in ipairs({ "Up", "Down" }) do
|
local mouse_scrolled = false
|
||||||
-- local key = "<ScrollWheel" .. scroll .. ">"
|
for _, scroll in ipairs({ "Up", "Down" }) do
|
||||||
-- vim.keymap.set({ "", "i" }, key, function()
|
local key = "<ScrollWheel" .. scroll .. ">"
|
||||||
-- mouse_scrolled = true
|
vim.keymap.set({ "", "i" }, key, function()
|
||||||
-- return key
|
mouse_scrolled = true
|
||||||
-- end, { expr = true })
|
return key
|
||||||
-- end
|
end, { expr = true })
|
||||||
--
|
end
|
||||||
-- local animate = require("mini.animate")
|
|
||||||
-- return {
|
local animate = require("mini.animate")
|
||||||
-- resize = {
|
return {
|
||||||
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
resize = {
|
||||||
-- },
|
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
||||||
-- scroll = {
|
},
|
||||||
-- timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
scroll = {
|
||||||
-- subscroll = animate.gen_subscroll.equal({
|
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
|
||||||
-- predicate = function(total_scroll)
|
subscroll = animate.gen_subscroll.equal({
|
||||||
-- if mouse_scrolled then
|
predicate = function(total_scroll)
|
||||||
-- mouse_scrolled = false
|
if mouse_scrolled then
|
||||||
-- return false
|
mouse_scrolled = false
|
||||||
-- end
|
return false
|
||||||
-- return total_scroll > 1
|
end
|
||||||
-- end,
|
return total_scroll > 1
|
||||||
-- }),
|
end,
|
||||||
-- },
|
}),
|
||||||
-- }
|
},
|
||||||
-- end,
|
}
|
||||||
-- config = function(_, opts)
|
end,
|
||||||
-- require("mini.animate").setup(opts)
|
config = function(_, opts)
|
||||||
-- end,
|
require("mini.animate").setup(opts)
|
||||||
-- },
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
-- opts = {
|
opts = {
|
||||||
-- user_default_options = {
|
user_default_options = {
|
||||||
-- tailwind = true,
|
tailwind = true,
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- {
|
{
|
||||||
-- "hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
-- dependencies = {
|
dependencies = {
|
||||||
-- { "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||||
-- },
|
},
|
||||||
-- opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- -- original kind icon formatter
|
-- original kind icon formatter
|
||||||
-- local format_kinds = opts.formatting.format
|
local format_kinds = opts.formatting.format
|
||||||
-- opts.formatting.format = function(entry, item)
|
opts.formatting.format = function(entry, item)
|
||||||
-- format_kinds(entry, item) -- add icons
|
format_kinds(entry, item) -- add icons
|
||||||
-- return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||||
-- end
|
end
|
||||||
-- end,
|
end,
|
||||||
-- },
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ return {
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
enabled = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "MunifTanjim/nui.nvim" },
|
{ "MunifTanjim/nui.nvim" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,6 @@ return {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
-- coding start
|
|
||||||
-- coloring code
|
-- coloring code
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
@ -54,28 +53,12 @@ return {
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "InsertEnter",
|
|
||||||
-- dependencies = {
|
|
||||||
-- "rafamadriz/friendly-snippets",
|
|
||||||
-- event = "BufRead",
|
|
||||||
-- config = function()
|
|
||||||
-- require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
-- require("user.snippets")
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
opts = {
|
opts = {
|
||||||
history = true,
|
history = true,
|
||||||
delete_check_events = "TextChanged",
|
delete_check_events = "TextChanged",
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
-- {
|
|
||||||
-- "<tab>",
|
|
||||||
-- function()
|
|
||||||
-- return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
|
||||||
-- end,
|
|
||||||
-- expr = true, silent = true, mode = "i",
|
|
||||||
-- },
|
|
||||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||||
},
|
},
|
||||||
|
@ -84,34 +67,10 @@ return {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
-- dependencies = {
|
|
||||||
-- "williamboman/mason-lspconfig.nvim",
|
|
||||||
-- },
|
|
||||||
-- config = function()
|
|
||||||
-- require("user.lsp")
|
|
||||||
-- end,
|
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- "williamboman/mason.nvim",
|
|
||||||
-- event = "VeryLazy",
|
|
||||||
-- cmd = {
|
|
||||||
-- "Mason",
|
|
||||||
-- "MasonInstall",
|
|
||||||
-- "MasonUninstall",
|
|
||||||
-- "MasonUninstallAll",
|
|
||||||
-- "MasonLog",
|
|
||||||
-- },
|
|
||||||
-- dependencies = { "williamboman/mason-lspconfig.nvim" },
|
|
||||||
-- init = function()
|
|
||||||
-- vim.tbl_map(function(plugin)
|
|
||||||
-- pcall(require, plugin)
|
|
||||||
-- end, { "lspconfig", "null-ls" })
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "InsertEnter",
|
|
||||||
dependencies = { "williamboman/mason-lspconfig.nvim" },
|
dependencies = { "williamboman/mason-lspconfig.nvim" },
|
||||||
cmd = {
|
cmd = {
|
||||||
"Mason",
|
"Mason",
|
||||||
|
@ -120,7 +79,6 @@ return {
|
||||||
"MasonUninstallAll",
|
"MasonUninstallAll",
|
||||||
"MasonLog",
|
"MasonLog",
|
||||||
},
|
},
|
||||||
-- keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
|
|
||||||
config = function()
|
config = function()
|
||||||
require("user.lsp")
|
require("user.lsp")
|
||||||
end,
|
end,
|
||||||
|
@ -137,7 +95,6 @@ return {
|
||||||
end
|
end
|
||||||
illuminate.configure({
|
illuminate.configure({
|
||||||
options = {
|
options = {
|
||||||
-- providers: provider used to get references in the buffer, ordered by priority
|
|
||||||
providers = {
|
providers = {
|
||||||
"lsp",
|
"lsp",
|
||||||
"treesitter",
|
"treesitter",
|
||||||
|
@ -189,7 +146,6 @@ return {
|
||||||
"jayp0521/mason-null-ls.nvim",
|
"jayp0521/mason-null-ls.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- "jose-elias-alvarez/null-ls.nvim",
|
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvimtools/none-ls-extras.nvim",
|
"nvimtools/none-ls-extras.nvim",
|
||||||
|
@ -240,8 +196,6 @@ return {
|
||||||
{
|
{
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufWinEnter",
|
|
||||||
-- event = "InsertEnter",
|
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
config = function()
|
||||||
require("ts_context_commentstring").setup({
|
require("ts_context_commentstring").setup({
|
||||||
|
@ -251,8 +205,6 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
-- event = "BufWinEnter",
|
|
||||||
-- event = "InsertEnter",
|
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function()
|
config = function()
|
||||||
require("user.comment")
|
require("user.comment")
|
||||||
|
@ -260,7 +212,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
-- event = "BufWinEnter",
|
version = "3.5.4",
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
|
@ -297,30 +249,6 @@ return {
|
||||||
},
|
},
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
},
|
},
|
||||||
-- styleing indent
|
|
||||||
-- {
|
|
||||||
-- "lukas-reineke/indent-blankline.nvim",
|
|
||||||
-- event = "BufRead",
|
|
||||||
-- config = function()
|
|
||||||
-- require("user.indentline")
|
|
||||||
-- -- require("ibl").setup()
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- for Speed up loading Lua modules in Neovim to improve startup time.
|
|
||||||
-- {
|
|
||||||
-- "lewis6991/impatient.nvim",
|
|
||||||
-- event = "BufWinEnter",
|
|
||||||
-- config = function()
|
|
||||||
-- require("user.impatient")
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
-- for live server html,css,js
|
|
||||||
-- {
|
|
||||||
-- "manzeloth/live-server",
|
|
||||||
-- cmd = { "LiveServer" },
|
|
||||||
-- event = "BufRead",
|
|
||||||
-- build = "npm install -g live-server",
|
|
||||||
-- },
|
|
||||||
-- for multi cursor select
|
-- for multi cursor select
|
||||||
{
|
{
|
||||||
"mg979/vim-visual-multi",
|
"mg979/vim-visual-multi",
|
||||||
|
@ -339,7 +267,6 @@ return {
|
||||||
-- for auto close tag
|
-- for auto close tag
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
-- event = "BufWinEnter",
|
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
|
@ -351,8 +278,6 @@ return {
|
||||||
{
|
{
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "InsertEnter",
|
|
||||||
-- dependencies = "nvim-lua/plenary.nvim",
|
|
||||||
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.coderunner")
|
require("user.coderunner")
|
||||||
|
@ -362,11 +287,7 @@ return {
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufWinEnter",
|
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
-- opts = function()
|
|
||||||
-- require("user.colorizer")
|
|
||||||
-- end,
|
|
||||||
opts = {
|
opts = {
|
||||||
user_default_options = {
|
user_default_options = {
|
||||||
RGB = true, -- #RGB hex codes
|
RGB = true, -- #RGB hex codes
|
||||||
|
@ -472,20 +393,12 @@ return {
|
||||||
},
|
},
|
||||||
-- for check startuptime
|
-- for check startuptime
|
||||||
{ "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime" },
|
{ "dstein64/vim-startuptime", lazy = true, cmd = "StartupTime" },
|
||||||
-- for coloring pairs
|
|
||||||
-- remark 20231101 - menyebabkan error treesitter
|
|
||||||
-- {
|
-- {
|
||||||
-- "p00f/nvim-ts-rainbow",
|
-- "HiPhish/nvim-ts-rainbow2",
|
||||||
|
-- lazy = true,
|
||||||
-- event = "BufRead",
|
-- event = "BufRead",
|
||||||
-- dependencies = "nvim-treesitter/nvim-treesitter",
|
-- dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
-- },
|
-- },
|
||||||
-- for git
|
|
||||||
{
|
|
||||||
"HiPhish/nvim-ts-rainbow2",
|
|
||||||
lazy = true,
|
|
||||||
event = "BufRead",
|
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
@ -497,6 +410,4 @@ return {
|
||||||
require("user.gitsigns")
|
require("user.gitsigns")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- remove duplicate
|
|
||||||
-- { "tpope/vim-repeat", event = "InsertEnter" },
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ return {
|
||||||
-- dashboard
|
-- dashboard
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
-- event = "BufWinEnter",
|
|
||||||
lazy = true,
|
lazy = true,
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -13,8 +12,6 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- dependencies = { "kyazdani42/nvim-web-devicons", opt = true },
|
|
||||||
-- event = "BufWinEnter",
|
|
||||||
event = { "BufRead", "BufNewFile" },
|
event = { "BufRead", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.lualine_cfg")
|
require("user.lualine_cfg")
|
||||||
|
@ -25,7 +22,6 @@ return {
|
||||||
"kyazdani42/nvim-web-devicons",
|
"kyazdani42/nvim-web-devicons",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = { "pojokcodeid/nvim-material-icon" },
|
dependencies = { "pojokcodeid/nvim-material-icon" },
|
||||||
-- event = "BufRead",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("user.webdevicons")
|
require("user.webdevicons")
|
||||||
end,
|
end,
|
||||||
|
@ -34,9 +30,7 @@ return {
|
||||||
{
|
{
|
||||||
"kyazdani42/nvim-tree.lua",
|
"kyazdani42/nvim-tree.lua",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufRead",
|
|
||||||
cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||||
-- dependencies = "kyazdani42/nvim-web-devicons",
|
|
||||||
config = function()
|
config = function()
|
||||||
local data_exists, treeconfig = pcall(require, "core.config")
|
local data_exists, treeconfig = pcall(require, "core.config")
|
||||||
if data_exists then
|
if data_exists then
|
||||||
|
@ -50,25 +44,21 @@ return {
|
||||||
{
|
{
|
||||||
"famiu/bufdelete.nvim",
|
"famiu/bufdelete.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "InsertEnter",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufWinEnter",
|
branch = "main",
|
||||||
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
event = { "BufRead", "InsertEnter", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("user.bufferline")
|
require("user.bufferline")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- for delete buffers (close files) without closing your windows or messing up your layout.
|
|
||||||
-- { "moll/vim-bbye", event = "InsertEnter" },
|
|
||||||
-- for view terminal
|
-- for view terminal
|
||||||
{
|
{
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = { "ToggleTerm" },
|
cmd = { "ToggleTerm" },
|
||||||
-- event = "InsertEnter",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("user.toggleterm")
|
require("user.toggleterm")
|
||||||
end,
|
end,
|
||||||
|
@ -87,8 +77,6 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
-- event = "BufRead",
|
|
||||||
-- dependencies = { { "nvim-lua/plenary.nvim" } },
|
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
version = false, -- telescope did only one release, so use HEAD for now
|
version = false, -- telescope did only one release, so use HEAD for now
|
||||||
config = function()
|
config = function()
|
||||||
|
|
|
@ -10,7 +10,7 @@ local rfile = {
|
||||||
typescript = "ts-node $dir/$fileName", -- npm install -g ts-node
|
typescript = "ts-node $dir/$fileName", -- npm install -g ts-node
|
||||||
rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
|
rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
|
||||||
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
|
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
|
||||||
cpp = "g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
|
cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
|
||||||
scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
|
scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
|
||||||
javascript = 'node "$dir/$fileName"',
|
javascript = 'node "$dir/$fileName"',
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,6 @@ M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities)
|
||||||
|
|
||||||
M.setup = function()
|
M.setup = function()
|
||||||
local signs = {
|
local signs = {
|
||||||
|
|
||||||
-- { name = "DiagnosticSignError", text = "" },
|
|
||||||
-- { name = "DiagnosticSignWarn", text = "" },
|
|
||||||
-- { name = "DiagnosticSignHint", text = "" },
|
|
||||||
-- { name = "DiagnosticSignInfo", text = "" },
|
|
||||||
{ name = "DiagnosticSignError", text = icons.diagnostics.Error },
|
{ name = "DiagnosticSignError", text = icons.diagnostics.Error },
|
||||||
{ name = "DiagnosticSignWarn", text = icons.diagnostics.Warning },
|
{ name = "DiagnosticSignWarn", text = icons.diagnostics.Warning },
|
||||||
{ name = "DiagnosticSignHint", text = icons.diagnostics.Hint },
|
{ name = "DiagnosticSignHint", text = icons.diagnostics.Hint },
|
||||||
|
@ -97,12 +92,13 @@ M.on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.name == "sumneko_lua" then
|
if client.name == "lua_ls" then
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.supports_method("textDocument/inlayHint") then
|
if client.supports_method("textDocument/inlayHint") then
|
||||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
-- vim.lsp.inlay_hint.enable(bufnr, true)
|
||||||
|
vim.lsp.inlay_hint.enable(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
lsp_keymaps(bufnr)
|
lsp_keymaps(bufnr)
|
||||||
|
|
|
@ -28,11 +28,16 @@ configs.setup({
|
||||||
-- json = "",
|
-- json = "",
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
|
-- rainbow = {
|
||||||
|
-- enable = true,
|
||||||
|
-- disable = { "html", "tsx" },
|
||||||
|
-- equery = "rainbow-parens",
|
||||||
|
-- strategy = require("ts-rainbow").strategy.global,
|
||||||
|
-- },
|
||||||
rainbow = {
|
rainbow = {
|
||||||
enable = true,
|
enable = false,
|
||||||
disable = { "html", "tsx" },
|
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
|
||||||
equery = "rainbow-parens",
|
max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
|
||||||
strategy = require("ts-rainbow").strategy.global,
|
|
||||||
},
|
},
|
||||||
-- autotag = { enable = true, enable_rename = true, enable_close = true, enable_close_on_slash = true },
|
-- autotag = { enable = true, enable_rename = true, enable_close = true, enable_close_on_slash = true },
|
||||||
incremental_selection = { enable = true },
|
incremental_selection = { enable = true },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue