feat: first commit
This commit is contained in:
5
lua/config/plugins/acmp.lua
Normal file
5
lua/config/plugins/acmp.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- require'cmp'.setup {
|
||||
-- sources = {
|
||||
-- { name = 'nvim_lsp' }
|
||||
-- }
|
||||
-- }
|
||||
13
lua/config/plugins/autocommand.lua
Normal file
13
lua/config/plugins/autocommand.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
vim.api.nvim_create_autocmd(
|
||||
{
|
||||
"BufNewFile",
|
||||
"BufRead",
|
||||
},
|
||||
{
|
||||
pattern = "*.typ",
|
||||
callback = function()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
vim.api.nvim_buf_set_option(buf, "filetype", "typst")
|
||||
end
|
||||
}
|
||||
)
|
||||
7
lua/config/plugins/autotag.lua
Normal file
7
lua/config/plugins/autotag.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
require('nvim-ts-autotag').setup({
|
||||
opts = {
|
||||
enable_close = true,
|
||||
enable_rename = true,
|
||||
enable_close_on_slash = false
|
||||
},
|
||||
})
|
||||
27
lua/config/plugins/bufferline.lua
Normal file
27
lua/config/plugins/bufferline.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
require("bufferline").setup({
|
||||
highlights = {
|
||||
background = {
|
||||
italic = false,
|
||||
},
|
||||
buffer_selected = {
|
||||
bold = true,
|
||||
},
|
||||
},
|
||||
options = {
|
||||
mode = "buffers",
|
||||
persist_buffer_sort = true,
|
||||
enforce_regular_tabs = false,
|
||||
always_show_bufferline = false,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NeoTree",
|
||||
text = "File Explorer",
|
||||
highlight = "Directory",
|
||||
separator = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
12
lua/config/plugins/colorizer.lua
Normal file
12
lua/config/plugins/colorizer.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
require("colorizer").setup {
|
||||
filetypes = { "scss", "sass", "css", "html", "jsx", "tsx" },
|
||||
user_default_options = {
|
||||
css = true,
|
||||
css_fn = true,
|
||||
mode = "background",
|
||||
tailwind = true,
|
||||
sass = { enable = true, parsers = { "css" }, },
|
||||
always_update = false
|
||||
},
|
||||
buftypes = {},
|
||||
}
|
||||
43
lua/config/plugins/comment.lua
Normal file
43
lua/config/plugins/comment.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
require("Comment").setup({
|
||||
---Add a space b/w comment and the line
|
||||
padding = true,
|
||||
---Whether the cursor should stay at its position
|
||||
sticky = true,
|
||||
---Lines to be ignored while (un)comment
|
||||
ignore = nil,
|
||||
---LHS of toggle mappings in NORMAL mode
|
||||
toggler = {
|
||||
---Line-comment toggle keymap
|
||||
line = '<leader>/',
|
||||
---Block-comment toggle keymap
|
||||
block = '<leader>/',
|
||||
},
|
||||
---LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
---Line-comment keymap
|
||||
line = 'gc',
|
||||
---Block-comment keymap
|
||||
block = 'gb',
|
||||
},
|
||||
---LHS of extra mappings
|
||||
extra = {
|
||||
---Add comment on the line above
|
||||
above = 'gcO',
|
||||
---Add comment on the line below
|
||||
below = 'gco',
|
||||
---Add comment at the end of line
|
||||
eol = 'gcA',
|
||||
},
|
||||
---Enable keybindings
|
||||
---NOTE: If given `false` then the plugin won't create any mappings
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = true,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = true,
|
||||
},
|
||||
---Function to call before (un)comment
|
||||
pre_hook = nil,
|
||||
---Function to call after (un)comment
|
||||
post_hook = nil,
|
||||
})
|
||||
99
lua/config/plugins/dap.lua
Executable file
99
lua/config/plugins/dap.lua
Executable file
@@ -0,0 +1,99 @@
|
||||
local dap = require('dap')
|
||||
|
||||
require("dap-vscode-js").setup({
|
||||
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug",
|
||||
debugger_cmd = { "js-debug-adapter" },
|
||||
adapters = { 'node-terminal' },
|
||||
})
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
|
||||
dap.adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "node",
|
||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.javascript = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
dap.adapters.chrome = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js"},
|
||||
}
|
||||
|
||||
dap.adapters.firefox = {
|
||||
type = 'executable',
|
||||
command = 'node',
|
||||
args = {os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js'},
|
||||
}
|
||||
|
||||
dap.configurations.typescriptreact = {
|
||||
{
|
||||
name = 'Next.js: debug server-side',
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
runtimeExecutable = "npm",
|
||||
runtimeArgs = { "run", "dev" },
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Next.js: debug client-side with chrome",
|
||||
type = "chrome",
|
||||
request = "launch",
|
||||
url = "http://localhost:3000"
|
||||
},
|
||||
{
|
||||
name = "Next.js: debug client-side with firefox",
|
||||
type = "firefox",
|
||||
request = "launch",
|
||||
url = 'http://localhost:3000',
|
||||
webRoot = '${workspaceFolder}',
|
||||
firefoxExecutable = '/usr/bin/waterfox',
|
||||
pathMappings = {
|
||||
{
|
||||
url = "webpack://_n_e/",
|
||||
path = "${workspaceFolder}/"
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.javascriptreact = dap.configurations.typescriptreact;
|
||||
|
||||
require("dapui").setup()
|
||||
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open({})
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)
|
||||
|
||||
30
lua/config/plugins/dropbar.lua
Normal file
30
lua/config/plugins/dropbar.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local sources = require("dropbar.sources")
|
||||
|
||||
local function get_hl_color(group, attr)
|
||||
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
||||
end
|
||||
|
||||
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]]
|
||||
vim.cmd [[hi WinBarNC guisp=#665c54 guibg=#313131]]
|
||||
|
||||
require("dropbar").setup(
|
||||
{
|
||||
bar = {
|
||||
sources = {
|
||||
{
|
||||
get_symbols = function(buf, win, cursor)
|
||||
local symbols = sources.path.get_symbols(buf, win, cursor)
|
||||
for _, symbol in ipairs(symbols) do
|
||||
local icon_fg = get_hl_color(symbol.icon_hl, "fg#")
|
||||
|
||||
local icon_string = ""
|
||||
|
||||
vim.cmd(icon_string)
|
||||
end
|
||||
return symbols
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
67
lua/config/plugins/gitsigns.lua
Normal file
67
lua/config/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
},
|
||||
signs_staged = {
|
||||
add = {
|
||||
text = " ┃",
|
||||
},
|
||||
change = {
|
||||
text = " ┃",
|
||||
},
|
||||
delete = {
|
||||
text = " ",
|
||||
},
|
||||
topdelete = {
|
||||
text = " ",
|
||||
},
|
||||
changedelete = {
|
||||
text = " ┃",
|
||||
},
|
||||
},
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
linehl = false,
|
||||
word_diff = false,
|
||||
watch_gitdir = {
|
||||
interval = 1000,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
|
||||
sign_priority = 6,
|
||||
status_formatter = nil, -- Use default
|
||||
update_debounce = 200,
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = "rounded",
|
||||
style = "minimal",
|
||||
relative = "cursor",
|
||||
row = 0,
|
||||
col = 1,
|
||||
},
|
||||
yadm = { enable = false },
|
||||
})
|
||||
|
||||
59
lua/config/plugins/lualine.lua
Normal file
59
lua/config/plugins/lualine.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 100,
|
||||
tabline = 100,
|
||||
winbar = 100,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
function()
|
||||
return " "
|
||||
end,
|
||||
padding = { left = 0, right = 0 },
|
||||
color = {},
|
||||
cond = nil,
|
||||
},
|
||||
},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'diff'},
|
||||
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
function()
|
||||
return " "
|
||||
end,
|
||||
padding = { left = 0, right = 0 },
|
||||
color = {},
|
||||
cond = nil,
|
||||
},
|
||||
},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'diff'},
|
||||
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
})
|
||||
22
lua/config/plugins/luasnip.lua
Normal file
22
lua/config/plugins/luasnip.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- vscode format
|
||||
require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} }
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
|
||||
|
||||
-- snipmate format
|
||||
require("luasnip.loaders.from_snipmate").load()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
|
||||
|
||||
-- lua format
|
||||
require("luasnip.loaders.from_lua").load()
|
||||
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
if
|
||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
and not require("luasnip").session.jump_active
|
||||
then
|
||||
require("luasnip").unlink_current()
|
||||
end
|
||||
end,
|
||||
})
|
||||
46
lua/config/plugins/navic.lua
Normal file
46
lua/config/plugins/navic.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
navic.setup {
|
||||
icons = {
|
||||
File = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Package = " ",
|
||||
Class = " ",
|
||||
Method = " ",
|
||||
Property = " ",
|
||||
Field = " ",
|
||||
Constructor = " ",
|
||||
Enum = "",
|
||||
Interface = "",
|
||||
Function = " ",
|
||||
Variable = " ",
|
||||
Constant = " ",
|
||||
String = " ",
|
||||
Number = " ",
|
||||
Boolean = "◩ ",
|
||||
Array = " ",
|
||||
Object = " ",
|
||||
Key = " ",
|
||||
Null = " ",
|
||||
EnumMember = " ",
|
||||
Struct = " ",
|
||||
Event = " ",
|
||||
Operator = " ",
|
||||
TypeParameter = " ",
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = false,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = true,
|
||||
seperator = ' ',
|
||||
depth_limit = 0,
|
||||
depth_limit_indicator = "..",
|
||||
safe_output = true,
|
||||
lazy_update_context = false,
|
||||
click = false,
|
||||
format_text = function(text)
|
||||
return text
|
||||
end,
|
||||
}
|
||||
52
lua/config/plugins/neotree.lua
Normal file
52
lua/config/plugins/neotree.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
vim.fn.sign_define("LspDiagnosticsSignError",
|
||||
{text = " ", texthl = "LspDiagnosticsSignError"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignWarning",
|
||||
{text = " ", texthl = "LspDiagnosticsSignWarning"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignInformation",
|
||||
{text = " ", texthl = "LspDiagnosticsSignInformation"})
|
||||
vim.fn.sign_define("LspDiagnosticsSignHint",
|
||||
{text = " ", texthl = "LspDiagnosticsSignHint"})
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false,
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
|
||||
sort_case_insensitive = false,
|
||||
sort_function = nil ,
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true,
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon"
|
||||
},
|
||||
modified = {
|
||||
symbol = "",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
added = "",
|
||||
modified = "",
|
||||
deleted = "",
|
||||
renamed = "",
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
19
lua/config/plugins/noice.lua
Normal file
19
lua/config/plugins/noice.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
require("noice").setup({
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||
},
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
})
|
||||
|
||||
28
lua/config/plugins/nvimufo.lua
Normal file
28
lua/config/plugins/nvimufo.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
vim.o.foldcolumn = "auto:9"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep:│,foldclose:]]
|
||||
|
||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
||||
|
||||
require('ufo').setup({
|
||||
open_fold_hl_timeout = 400,
|
||||
close_fold_kinds = { "imports", "comment" },
|
||||
preview = {
|
||||
win_config = {
|
||||
border = { "", "─", "", "", "", "─", "", "" },
|
||||
winblend = 0,
|
||||
},
|
||||
mappings = {
|
||||
scrollU = "<C-u>",
|
||||
scrollD = "<C-d>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return {'treesitter', 'indent'}
|
||||
end
|
||||
})
|
||||
19
lua/config/plugins/prettier.lua
Normal file
19
lua/config/plugins/prettier.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local prettier = require("prettier")
|
||||
|
||||
prettier.setup({
|
||||
bin = 'prettier',
|
||||
filetypes = {
|
||||
"css",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"scss",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
8
lua/config/plugins/treesitter.lua
Normal file
8
lua/config/plugins/treesitter.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { 'rust', 'c', 'lua', 'tsx', 'javascript', 'typescript' },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
||||
36
lua/config/plugins/winbar.lua
Normal file
36
lua/config/plugins/winbar.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
require('winbar').setup({
|
||||
enabled = true,
|
||||
|
||||
show_file_path = true,
|
||||
show_symbols = true,
|
||||
|
||||
colors = {
|
||||
path = '', -- You can customize colors like #c946fd
|
||||
file_name = '',
|
||||
symbols = '',
|
||||
},
|
||||
|
||||
icons = {
|
||||
file_icon_default = '',
|
||||
seperator = ' ',
|
||||
editor_state = '●',
|
||||
lock_icon = '',
|
||||
},
|
||||
|
||||
exclude_filetype = {
|
||||
'help',
|
||||
'startify',
|
||||
'dashboard',
|
||||
'packer',
|
||||
'neo-tree',
|
||||
'neogitstatus',
|
||||
'NvimTree',
|
||||
'Trouble',
|
||||
'alpha',
|
||||
'lir',
|
||||
'Outline',
|
||||
'spectre_panel',
|
||||
'toggleterm',
|
||||
'qf',
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user