Add coc basic config, not fully working yet
This commit is contained in:
64
nvim-coc/lua/plugins/style/bufferline.lua
Executable file
64
nvim-coc/lua/plugins/style/bufferline.lua
Executable file
@@ -0,0 +1,64 @@
|
||||
return {
|
||||
-- tab line
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
local bufferline = require("bufferline")
|
||||
bufferline.setup({
|
||||
options = {
|
||||
mode = "buffers",
|
||||
show_buffer_close_icons = false,
|
||||
middle_mouse_command = "bdelete! %d",
|
||||
indicator = { style = "underline" },
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = " ",
|
||||
text_align = "center",
|
||||
separator = true,
|
||||
},
|
||||
},
|
||||
|
||||
separator_style = { " ", " " },
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return icon .. count
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
local opts = { silent = true }
|
||||
-- go to buffer
|
||||
opts.desc = "go to buffer 1"
|
||||
vim.keymap.set("n", "g1", "<Cmd>BufferLineGoToBuffer 1<CR>", opts)
|
||||
opts.desc = "go to buffer 2"
|
||||
vim.keymap.set("n", "g2", "<Cmd>BufferLineGoToBuffer 2<CR>", opts)
|
||||
opts.desc = "go to buffer 3"
|
||||
vim.keymap.set("n", "g3", "<Cmd>BufferLineGoToBuffer 3<CR>", opts)
|
||||
opts.desc = "go to buffer 4"
|
||||
vim.keymap.set("n", "g4", "<Cmd>BufferLineGoToBuffer 4<CR>", opts)
|
||||
opts.desc = "go to buffer 5"
|
||||
vim.keymap.set("n", "g5", "<Cmd>BufferLineGoToBuffer 5<CR>", opts)
|
||||
opts.desc = "go to buffer 6"
|
||||
vim.keymap.set("n", "g6", "<Cmd>BufferLineGoToBuffer 6<CR>", opts)
|
||||
opts.desc = "go to buffer 7"
|
||||
vim.keymap.set("n", "g7", "<Cmd>BufferLineGoToBuffer 7<CR>", opts)
|
||||
opts.desc = "go to buffer 8"
|
||||
vim.keymap.set("n", "g8", "<Cmd>BufferLineGoToBuffer 8<CR>", opts)
|
||||
opts.desc = "go to buffer 9"
|
||||
vim.keymap.set("n", "g9", "<Cmd>BufferLineGoToBuffer 9<CR>", opts)
|
||||
opts.desc = "go to buffer 10"
|
||||
vim.keymap.set("n", "g0", "<Cmd>BufferLineGoToBuffer 10<CR>", opts)
|
||||
opts.desc = nil
|
||||
-- cycle between buffers
|
||||
vim.keymap.set("n", "J", "<cmd>BufferLineCyclePrev<CR>", opts)
|
||||
vim.keymap.set("n", "K", "<cmd>BufferLineCycleNext<CR>", opts)
|
||||
-- move buffers
|
||||
vim.keymap.set("n", "<C-S-J>", "<cmd>BufferLineMovePrev<CR>", opts)
|
||||
vim.keymap.set("n", "<C-S-K>", "<cmd>BufferLineMoveNext<CR>", opts)
|
||||
-- go to previous buffer
|
||||
vim.keymap.set({ "n", "i" }, "<C-Tab>", "<cmd>b#<CR>", opts)
|
||||
end,
|
||||
}
|
34
nvim-coc/lua/plugins/style/colorizer.lua
Executable file
34
nvim-coc/lua/plugins/style/colorizer.lua
Executable file
@@ -0,0 +1,34 @@
|
||||
return {
|
||||
-- colorizes colors in code
|
||||
'NvChad/nvim-colorizer.lua' ,
|
||||
--cmd = 'ColorizerToggle',
|
||||
config = function ()
|
||||
require("colorizer").setup {
|
||||
filetypes = { "*" },
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes - #FCE
|
||||
RRGGBB = true, -- #RRGGBB hex codes - #F5C2E7
|
||||
names = true, -- "Name" codes - lightpink
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes - #F5C2E7CC
|
||||
AARRGGBB = true, -- 0xAARRGGBB hex codes - 0xCCF5C2E7
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions - rgba(245,194,231,0.8)
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions - hsl(0.88,0.72,0.86)
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes for `mode`: foreground, background, virtualtext
|
||||
mode = "background", -- Set the display mode.
|
||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
||||
-- True is same as normal
|
||||
tailwind = false, -- Enable tailwind colors
|
||||
-- parsers can contain values used in |user_default_options|
|
||||
sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors
|
||||
virtualtext = "■",
|
||||
-- update color values even if buffer is not focused
|
||||
-- example use: cmp_menu, cmp_docs
|
||||
always_update = false
|
||||
},
|
||||
-- all the sub-options of filetypes apply to buftypes
|
||||
buftypes = {},
|
||||
}
|
||||
end,
|
||||
}
|
139
nvim-coc/lua/plugins/style/colors.lua
Executable file
139
nvim-coc/lua/plugins/style/colors.lua
Executable file
@@ -0,0 +1,139 @@
|
||||
return {
|
||||
-- color theme
|
||||
"EdenEast/nightfox.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local Shade = require("nightfox.lib.shade")
|
||||
require("nightfox").setup({
|
||||
options = {
|
||||
transparent = true,
|
||||
styles = {
|
||||
comments = "italic",
|
||||
functions = "italic",
|
||||
keywords = "italic",
|
||||
types = "italic",
|
||||
}
|
||||
},
|
||||
palettes = {
|
||||
all = {
|
||||
black = Shade.new("#404944", 0.15, -0.15),
|
||||
gray = Shade.new("#505050", 0.15, -0.15),
|
||||
white = Shade.new("#dee4df", 0.15, -0.15),
|
||||
red = Shade.new("#ff6060", 0.15, -0.15),
|
||||
darkred = Shade.new("#903030", 0.15, -0.15),
|
||||
strongred = Shade.new("#bb0000", 0.15, -0.15),
|
||||
orange = Shade.new("#ce8c14", 0.15, -0.15),
|
||||
green = Shade.new("#a3d397", 0.10, -0.15),
|
||||
darkgreen = Shade.new("#005602", 0.10, -0.15),
|
||||
darkyellow = Shade.new("#dfd100", 0.10, -0.15),
|
||||
yellow = Shade.new("#e3c46d", 0.15, -0.15),
|
||||
darkblue = Shade.new("#1010aa", 0.15, -0.15),
|
||||
blue = Shade.new("#7070dd", 0.15, -0.15),
|
||||
magenta = Shade.new("#C02490", 0.30, -0.15),
|
||||
pink = Shade.new("#ff82c2", 0.15, -0.15),
|
||||
purple = Shade.new("#761464", 0.15, -0.15),
|
||||
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
|
||||
lightblue = Shade.new("#5c77ff", 0.15, -0.15),
|
||||
softblue = Shade.new("#10ddff", 0.15, -0.15),
|
||||
brown = Shade.new("#553200", 0.15, -0.15),
|
||||
|
||||
bg0 = "#0f1512", -- Dark bg (status line and float)
|
||||
bg1 = "#0f1512", -- Default bg
|
||||
bg2 = "#1b211e", -- Lighter bg (colorcolm folds)
|
||||
bg3 = "#252b28", -- Lighter bg (cursor line)
|
||||
bg4 = "#303633", -- Conceal, border fg
|
||||
|
||||
fg0 = "#dee4df", -- Lighter fg
|
||||
fg1 = "#dee4df", -- Default fg
|
||||
fg2 = "#dee4df", -- Darker fg (status line)
|
||||
fg3 = "#89938d", -- Darker fg (line numbers, fold colums)
|
||||
|
||||
sel0 = "#404944", -- Popup bg, visual selection
|
||||
sel1 = "#00513b", -- Popup sel bg, search bg
|
||||
|
||||
comment = "#89938d",
|
||||
},
|
||||
},
|
||||
specs = {
|
||||
carbonfox = {
|
||||
syntax = {
|
||||
comment = "comment",
|
||||
bracket = "darkyellow",
|
||||
builtin0 = "softblue",
|
||||
builtin1 = "sel0",
|
||||
builtin2 = "sel1",
|
||||
conditional = "darkblue",
|
||||
const = "gray",
|
||||
dep = "darkred",
|
||||
field = "green",
|
||||
func = "pink",
|
||||
ident = "darkgreen",
|
||||
keyword = "blue",
|
||||
number = "yellow",
|
||||
operator = "white",
|
||||
preproc = "strongred",
|
||||
regex = "purple",
|
||||
statement = "magenta",
|
||||
string = "cyan",
|
||||
type = "red",
|
||||
variable = "orange"
|
||||
},
|
||||
diag = {
|
||||
error = "darkred",
|
||||
warn = "yellow",
|
||||
info = "lightblue",
|
||||
hint = "fg3",
|
||||
ok = "darkgreen",
|
||||
},
|
||||
diag_bg = {
|
||||
error = "red",
|
||||
warn = "#a16b00",
|
||||
info = "cyan",
|
||||
hint = "bg3",
|
||||
ok = "green";
|
||||
},
|
||||
diff = {
|
||||
add = "darkgreen",
|
||||
delete = "darkred",
|
||||
changed = "lightblue",
|
||||
text = "fg0"
|
||||
},
|
||||
git = {
|
||||
add = "darkgreen",
|
||||
removed = "darkred",
|
||||
changed = "lightblue",
|
||||
conflict = "orange",
|
||||
ignored = "gray"
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = {
|
||||
all = {
|
||||
Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor
|
||||
WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows
|
||||
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
||||
CursorLine = { bg = "palette.bg1" },
|
||||
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||
Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||
IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
|
||||
|
||||
NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" },
|
||||
NvimTreeFolderName = { fg = "palette.lightblue" },
|
||||
NvimTreeFolderIcon = { fg = "palette.lightblue" },
|
||||
NvimTreeOpenedFolderName = { fg = "palette.lightblue" },
|
||||
NvimTreeSymlinkFolderName = { fg = "palette.magenta" },
|
||||
|
||||
NvimTreeExecFile = { fg = "palette.red" },
|
||||
NvimTreeImageFile = { fg = "palette.white" },
|
||||
NvimTreeSpecialFile = { fg = "palette.yellow" },
|
||||
NvimTreeSymlink = { fg = "palette.magenta" },
|
||||
},
|
||||
},
|
||||
})
|
||||
if not vim.g.vscode then
|
||||
vim.cmd([[colorscheme carbonfox]])
|
||||
end
|
||||
end,
|
||||
}
|
5
nvim-coc/lua/plugins/style/dressing.lua
Executable file
5
nvim-coc/lua/plugins/style/dressing.lua
Executable file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
-- prettier prompts
|
||||
'stevearc/dressing.nvim',
|
||||
event = 'VeryLazy',
|
||||
}
|
55
nvim-coc/lua/plugins/style/lualine.lua
Executable file
55
nvim-coc/lua/plugins/style/lualine.lua
Executable file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
-- status line
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
local function getWords()
|
||||
local wc = vim.api.nvim_eval("wordcount()")
|
||||
if wc["visual_words"] then
|
||||
return wc["visual_words"]
|
||||
else
|
||||
return wc["words"]
|
||||
end
|
||||
end
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = { 'NvimTree' },
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { { 'mode', separator = { left = '', right = '' }, } },
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = { getWords, 'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = { { 'progress', left_padding=0 } },
|
||||
lualine_z = { { 'location', separator = { left = '', right = '' }, padding=0} }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
end,
|
||||
}
|
77
nvim-coc/lua/plugins/style/startup.lua
Executable file
77
nvim-coc/lua/plugins/style/startup.lua
Executable file
@@ -0,0 +1,77 @@
|
||||
return {
|
||||
"startup-nvim/startup.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("startup").setup({
|
||||
title = {
|
||||
type = "text",
|
||||
align = "center",
|
||||
content = {
|
||||
[[]],
|
||||
[[]],
|
||||
[[]],
|
||||
[[ ]],
|
||||
[[ ██████ █████ █████ █████ ███ ]],
|
||||
[[ ░░██████ ░░███ ░░███ ░░███ ░░░ ]],
|
||||
[[ ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ]],
|
||||
[[ ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ]],
|
||||
[[ ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ]],
|
||||
[[ ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ]],
|
||||
[[ █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ]],
|
||||
[[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ]],
|
||||
[[ ]],
|
||||
},
|
||||
highlight = "String",
|
||||
default_color = "#010155"
|
||||
},
|
||||
|
||||
quotes = {
|
||||
type = "text",
|
||||
align = "center",
|
||||
content = function ()
|
||||
local handle = io.popen("pwd")
|
||||
if handle then
|
||||
local cwd = handle:read("*l")
|
||||
handle:close()
|
||||
return {"Currently in " .. cwd}
|
||||
else
|
||||
return {"Error running command"}
|
||||
end
|
||||
end,
|
||||
highlight = "String",
|
||||
default_color = "#FFFFFF"
|
||||
},
|
||||
|
||||
old = {
|
||||
type = "oldfiles",
|
||||
oldfiles_directory = true,
|
||||
align = "center",
|
||||
title = "Old files",
|
||||
oldfiles_amount = 10,
|
||||
highlight = "String",
|
||||
default_color = "#FFFFFF",
|
||||
content = "",
|
||||
},
|
||||
|
||||
options = {
|
||||
mapping_keys = false;
|
||||
},
|
||||
|
||||
colors = {
|
||||
background = "#000000",
|
||||
folded_section = "#100000"
|
||||
},
|
||||
|
||||
mappings = {
|
||||
execute_command = "<C-r>",
|
||||
open_file = "<CR>",
|
||||
},
|
||||
|
||||
parts = {"title", "quotes", "old"}
|
||||
})
|
||||
end,
|
||||
}
|
Reference in New Issue
Block a user