remove nvim conf
This commit is contained in:
parent
1e1d5d264a
commit
7273ea8d92
31 changed files with 0 additions and 1140 deletions
3
.config/nvim/.gitignore
vendored
3
.config/nvim/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
/.*
|
||||
!.gitignore
|
||||
lazy-lock.json
|
|
@ -1,17 +0,0 @@
|
|||
# Coprs
|
||||
yorickpeterse/stylua
|
||||
|
||||
# YUM Repos
|
||||
echo '[charm]
|
||||
name=Charm
|
||||
baseurl=https://repo.charm.sh/yum/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
|
||||
|
||||
# Packages
|
||||
neovim lua gcc curl wget git unzip tar gzip ripgrep php composer go nodejs npm delve stylua
|
||||
|
||||
# NPM
|
||||
npm install -g @fsouza/prettierd
|
||||
npm install -g eslint_d
|
|
@ -1 +0,0 @@
|
|||
require("core")
|
|
@ -1,8 +0,0 @@
|
|||
-- Use 2 Spaces Instead of Tabs --
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
-- Enable Line Number --
|
||||
vim.opt.number = true
|
|
@ -1,3 +0,0 @@
|
|||
require("core.keymap")
|
||||
require("core.editor")
|
||||
require("core.package_manager")
|
|
@ -1,5 +0,0 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
--[[ Indentation ]]
|
||||
vim.keymap.set("n", "<Tab>", ">>")
|
||||
vim.keymap.set("n", "<S-Tab>", "<<")
|
|
@ -1,15 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
local opts = {}
|
||||
require("lazy").setup("plugins", opts)
|
|
@ -1,32 +0,0 @@
|
|||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
-- Setup --
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
-- Header --
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ████ ██████ █████ ██ ]],
|
||||
[[ ███████████ █████ ]],
|
||||
[[ █████████ ███████████████████ ███ ███████████ ]],
|
||||
[[ █████████ ███ █████████████ █████ ██████████████ ]],
|
||||
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
|
||||
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
require("plugins.editor.editor_auto_brackets"),
|
||||
require("plugins.editor.editor_code_highlighting"),
|
||||
require("plugins.editor.editor_code_snippets"),
|
||||
require("plugins.editor.editor_debugging"),
|
||||
require("plugins.editor.editor_language_server"),
|
||||
require("plugins.editor.editor_markdown_preview"),
|
||||
require("plugins.editor.editor_nvim_dev"),
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
"leoluz/nvim-dap-go",
|
||||
config = function()
|
||||
local dir = require("utils.finder").find_project_dir(
|
||||
"go.mod",
|
||||
3,
|
||||
{ "src", "app", "pkg" },
|
||||
{ "test" },
|
||||
true
|
||||
)
|
||||
require("dap-go").setup({ delve = { cwd = dir } })
|
||||
end,
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
"m4xshen/autoclose.nvim",
|
||||
config = function() require("autoclose").setup() end,
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
-- Setup --
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"NoahTheDuke/vim-just",
|
||||
ft = { "just" },
|
||||
},
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "2.*",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"mireq/luasnip-snippets",
|
||||
},
|
||||
build = "make install_jsregexp",
|
||||
config = function()
|
||||
-- Setup --
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
||||
require("luasnip_snippets.common.snip_utils").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
-- Setup --
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.setup({
|
||||
load_ft_func = require("luasnip_snippets.common.snip_utils").load_ft_func,
|
||||
ft_func = require("luasnip_snippets.common.snip_utils").ft_func,
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set({ "i", "s" }, "<Tab>", function()
|
||||
if luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
vim.api.nvim_input("<C-V><Tab>")
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
vim.keymap.set(
|
||||
{ "i", "s" },
|
||||
"<S-Tab>",
|
||||
function() luasnip.jump(-1) end,
|
||||
{ silent = true }
|
||||
)
|
||||
|
||||
local doc_keybindings = {
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}
|
||||
|
||||
-- Setup --
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args) luasnip.lsp_expand(args.body) end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert(doc_keybindings),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "lazydev", group_index = 0 },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, { { name = "buffer" } }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"nvim-neotest/nvim-nio",
|
||||
},
|
||||
config = function()
|
||||
-- Setup Debugging --
|
||||
local dap = require("dap")
|
||||
|
||||
-- Open UI on Debugging --
|
||||
local dapui = require("dapui")
|
||||
dapui.setup({
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{ id = "scopes", size = 0.65 },
|
||||
{ id = "breakpoints", size = 0.35 },
|
||||
},
|
||||
position = "left",
|
||||
size = 40,
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
{ id = "repl", size = 0.5 },
|
||||
{ id = "console", size = 0.5 },
|
||||
},
|
||||
position = "bottom",
|
||||
size = 10,
|
||||
},
|
||||
},
|
||||
})
|
||||
dap.listeners.before.attach.dapui_config = function() dapui.open() end
|
||||
dap.listeners.before.launch.dapui_config = function() dapui.open() end
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>dt",
|
||||
dapui.toggle,
|
||||
{ desc = "Toggle Debugger UI" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>db",
|
||||
dap.toggle_breakpoint,
|
||||
{ desc = "Toggle Breakpoint" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>dc",
|
||||
dap.continue,
|
||||
{ desc = "Debugger Continue" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>dx",
|
||||
dap.terminate,
|
||||
{ desc = "Debugger Terminate" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>ds",
|
||||
dap.step_over,
|
||||
{ desc = "Debugger Step Over" }
|
||||
)
|
||||
|
||||
-- Breakpoints --
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
"DapBreakpoint",
|
||||
{ ctermbg = 0, fg = "#993939", bg = "#31353f" }
|
||||
)
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
"DapLogPoint",
|
||||
{ ctermbg = 0, fg = "#61afef", bg = "#31353f" }
|
||||
)
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
"DapStopped",
|
||||
{ ctermbg = 0, fg = "#98c379", bg = "#31353f" }
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpoint",
|
||||
{
|
||||
text = "",
|
||||
texthl = "DapBreakpoint",
|
||||
linehl = "DapBreakpoint",
|
||||
numhl = "DapBreakpoint",
|
||||
}
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpointCondition",
|
||||
{
|
||||
text = "",
|
||||
texthl = "DapBreakpoint",
|
||||
linehl = "DapBreakpoint",
|
||||
numhl = "DapBreakpoint",
|
||||
}
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpointRejected",
|
||||
{
|
||||
text = "",
|
||||
texthl = "DapBreakpoint",
|
||||
linehl = "DapBreakpoint",
|
||||
numhl = "DapBreakpoint",
|
||||
}
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapLogPoint",
|
||||
{
|
||||
text = "",
|
||||
texthl = "DapLogPoint",
|
||||
linehl = "DapLogPoint",
|
||||
numhl = "DapLogPoint",
|
||||
}
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapStopped",
|
||||
{
|
||||
text = "",
|
||||
texthl = "DapStopped",
|
||||
linehl = "DapStopped",
|
||||
numhl = "DapStopped",
|
||||
}
|
||||
)
|
||||
end,
|
||||
},
|
||||
require("plugins.editor.debugging.debugging_go"),
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
local lua_lsp = require("plugins.editor.language_server.language_server_lua")
|
||||
local generic_lsp =
|
||||
require("plugins.editor.language_server.language_server_generic")
|
||||
local go_lsp = require("plugins.editor.language_server.language_server_go")
|
||||
local web_lsp = require("plugins.editor.language_server.language_server_web")
|
||||
local php_lsp = require("plugins.editor.language_server.language_server_php")
|
||||
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
config = function() require("mason").setup() end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
auto_install = true,
|
||||
},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
table.unpack(lua_lsp.mason_requirements),
|
||||
table.unpack(generic_lsp.mason_requirements),
|
||||
table.unpack(go_lsp.mason_requirements),
|
||||
table.unpack(web_lsp.mason_requirements),
|
||||
table.unpack(php_lsp.mason_requirements),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- Setup --
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lua_lsp.setup(lspconfig, capabilities)
|
||||
generic_lsp.setup(lspconfig, capabilities)
|
||||
go_lsp.setup(lspconfig, capabilities)
|
||||
web_lsp.setup(lspconfig, capabilities)
|
||||
php_lsp.setup(lspconfig, capabilities)
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cd",
|
||||
vim.lsp.buf.hover,
|
||||
{ desc = "Show Code Definition" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>gd",
|
||||
vim.lsp.buf.definition,
|
||||
{ desc = "Go to Definition" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>gr",
|
||||
vim.lsp.buf.references,
|
||||
{ desc = "Go to References" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>ca",
|
||||
vim.lsp.buf.code_action,
|
||||
{ desc = "Do Code Actions" }
|
||||
)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- Setup --
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
table.unpack(lua_lsp.formatter(null_ls)),
|
||||
table.unpack(generic_lsp.formatter(null_ls)),
|
||||
table.unpack(go_lsp.formatter(null_ls)),
|
||||
table.unpack(web_lsp.formatter(null_ls)),
|
||||
table.unpack(php_lsp.formatter(null_ls)),
|
||||
},
|
||||
})
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fc",
|
||||
vim.lsp.buf.format,
|
||||
{ desc = "Format Code" }
|
||||
)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/lspsaga.nvim",
|
||||
after = "nvim-lspconfig",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
local lspsaga = require("lspsaga")
|
||||
lspsaga.setup({})
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cr",
|
||||
":Lspsaga rename<CR>",
|
||||
{ desc = "Rename Variable" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cp",
|
||||
":Lspsaga peek_definition<CR>",
|
||||
{ desc = "Peek Code Definition" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
{ "n", "t" },
|
||||
"<F6>",
|
||||
"<cmd>Lspsaga term_toggle<CR>",
|
||||
{ desc = "Toggle Terminal" }
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
return {
|
||||
"mrjones2014/mdpreview.nvim",
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
"norcalli/nvim-terminal.lua",
|
||||
config = true,
|
||||
},
|
||||
config = function()
|
||||
require("mdpreview").setup({
|
||||
cli_args = {
|
||||
"glow",
|
||||
"-s",
|
||||
"~/.config/glow/catppuccin-macchiato.json",
|
||||
"-w",
|
||||
"1",
|
||||
"--local",
|
||||
},
|
||||
renderer = {
|
||||
opts = {
|
||||
win_opts = {
|
||||
number = true,
|
||||
wrap = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<Leader>mp",
|
||||
":Mdpreview<CR>",
|
||||
{ desc = "Show Markdown Preview" }
|
||||
)
|
||||
end,
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
opts = {
|
||||
library = {},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
local LSP = {}
|
||||
|
||||
LSP.mason_requirements = {
|
||||
"bashls",
|
||||
"jsonls",
|
||||
"sqlls",
|
||||
"lemminx",
|
||||
"yamlls",
|
||||
"marksman",
|
||||
}
|
||||
|
||||
LSP.plugin_info = {}
|
||||
|
||||
function LSP.setup(lspconfig, capabilities)
|
||||
local config = { capabilities = capabilities }
|
||||
lspconfig.bashls.setup(config)
|
||||
lspconfig.jsonls.setup(config)
|
||||
lspconfig.sqlls.setup(config)
|
||||
lspconfig.lemminx.setup(config)
|
||||
lspconfig.yamlls.setup(config)
|
||||
lspconfig.marksman.setup(config)
|
||||
end
|
||||
|
||||
function LSP.formatter(null_ls)
|
||||
return {
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
command = "prettierd",
|
||||
}),
|
||||
null_ls.builtins.diagnostics.spectral,
|
||||
null_ls.builtins.code_actions.refactoring,
|
||||
null_ls.builtins.code_actions.proselint,
|
||||
null_ls.builtins.diagnostics.actionlint,
|
||||
null_ls.builtins.diagnostics.markdownlint,
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
null_ls.builtins.diagnostics.checkmake,
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
null_ls.builtins.diagnostics.vacuum,
|
||||
}
|
||||
end
|
||||
|
||||
return LSP
|
|
@ -1,23 +0,0 @@
|
|||
local LSP = {}
|
||||
|
||||
LSP.mason_requirements = {
|
||||
"gopls",
|
||||
}
|
||||
|
||||
LSP.plugin_info = {}
|
||||
|
||||
function LSP.setup(lspconfig, capabilities)
|
||||
lspconfig.gopls.setup({ capabilities = capabilities })
|
||||
end
|
||||
|
||||
function LSP.formatter(null_ls)
|
||||
return {
|
||||
null_ls.builtins.formatting.gofumpt,
|
||||
null_ls.builtins.code_actions.gomodifytags,
|
||||
null_ls.builtins.code_actions.impl,
|
||||
null_ls.builtins.diagnostics.golangci_lint,
|
||||
null_ls.builtins.diagnostics.staticcheck,
|
||||
}
|
||||
end
|
||||
|
||||
return LSP
|
|
@ -1,29 +0,0 @@
|
|||
local LSP = {}
|
||||
|
||||
LSP.mason_requirements = {
|
||||
"lua_ls",
|
||||
}
|
||||
|
||||
LSP.plugin_info = {}
|
||||
|
||||
function LSP.setup(lspconfig, capabilities)
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
function LSP.formatter(null_ls)
|
||||
return {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.selene,
|
||||
}
|
||||
end
|
||||
|
||||
return LSP
|
|
@ -1,28 +0,0 @@
|
|||
local LSP = {}
|
||||
|
||||
LSP.mason_requirements = {
|
||||
"phpactor",
|
||||
"stimulus_ls",
|
||||
}
|
||||
|
||||
LSP.plugin_info = {}
|
||||
|
||||
function LSP.setup(lspconfig, capabilities)
|
||||
local config = { capabilities = capabilities }
|
||||
lspconfig.phpactor.setup(config)
|
||||
lspconfig.stimulus_ls.setup(config)
|
||||
end
|
||||
|
||||
function LSP.formatter(null_ls)
|
||||
return {
|
||||
null_ls.builtins.diagnostics.phpstan,
|
||||
null_ls.builtins.formatting.phpcsfixer.with({
|
||||
prefer_local = "vendor/bin/php-cs-fixer",
|
||||
args = { "fix", "--allow-risky=yes", "$FILENAME" },
|
||||
}),
|
||||
null_ls.builtins.diagnostics.phpcs,
|
||||
null_ls.builtins.diagnostics.twigcs,
|
||||
}
|
||||
end
|
||||
|
||||
return LSP
|
|
@ -1,35 +0,0 @@
|
|||
local LSP = {}
|
||||
|
||||
LSP.mason_requirements = {
|
||||
"html",
|
||||
"emmet_ls",
|
||||
"cssls",
|
||||
"tailwindcss",
|
||||
"tsserver",
|
||||
"svelte",
|
||||
"volar",
|
||||
"eslint",
|
||||
}
|
||||
|
||||
LSP.plugin_info = {}
|
||||
|
||||
function LSP.setup(lspconfig, capabilities)
|
||||
local config = { capabilities = capabilities }
|
||||
lspconfig.html.setup(config)
|
||||
lspconfig.emmet_ls.setup(config)
|
||||
lspconfig.cssls.setup(config)
|
||||
lspconfig.tailwindcss.setup(config)
|
||||
lspconfig.tsserver.setup(config)
|
||||
lspconfig.svelte.setup(config)
|
||||
lspconfig.volar.setup(config)
|
||||
lspconfig.eslint.setup(config)
|
||||
end
|
||||
|
||||
function LSP.formatter(null_ls)
|
||||
return {
|
||||
require("none-ls.formatting.eslint_d"),
|
||||
null_ls.builtins.diagnostics.stylelint,
|
||||
}
|
||||
end
|
||||
|
||||
return LSP
|
|
@ -1,65 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
M.filetypes = {
|
||||
"dap-repl",
|
||||
"dapui_console",
|
||||
"dapui_console",
|
||||
"dapui_watches",
|
||||
"dapui_stacks",
|
||||
"dapui_breakpoints",
|
||||
"dapui_scopes",
|
||||
}
|
||||
|
||||
local function merge_colors(foreground, background)
|
||||
local new_name = foreground .. background
|
||||
|
||||
local hl_fg = vim.api.nvim_get_hl(0, { name = foreground })
|
||||
local hl_bg = vim.api.nvim_get_hl(0, { name = background })
|
||||
|
||||
local fg = string.format("#%06x", hl_fg.fg and hl_fg.fg or 0)
|
||||
local bg = string.format("#%06x", hl_bg.bg and hl_bg.bg or 0)
|
||||
|
||||
vim.api.nvim_set_hl(0, new_name, { fg = fg, bg = bg })
|
||||
return new_name
|
||||
end
|
||||
|
||||
local function get_dap_repl_winbar(active)
|
||||
local get_mode = require("lualine.highlight").get_mode_suffix
|
||||
|
||||
return function()
|
||||
local filetype = vim.bo.filetype
|
||||
local disabled_filetypes = { "dap-repl" }
|
||||
|
||||
if not vim.tbl_contains(disabled_filetypes, filetype) then
|
||||
return ""
|
||||
end
|
||||
|
||||
local background_color = string.format(
|
||||
"lualine_b" .. "%s",
|
||||
active and get_mode() or "_inactive"
|
||||
)
|
||||
|
||||
local controls_string = "%#" .. background_color .. "#"
|
||||
for element in require("dapui.controls").controls():gmatch("%S+") do
|
||||
local color, action = string.match(element, "%%#(.*)#(%%.*)%%#0#")
|
||||
controls_string = controls_string
|
||||
.. " %#"
|
||||
.. merge_colors(color, background_color)
|
||||
.. "#"
|
||||
.. action
|
||||
end
|
||||
return controls_string
|
||||
end
|
||||
end
|
||||
|
||||
M.winbar = {
|
||||
lualine_a = { { "filename", file_status = false } },
|
||||
lualine_b = { get_dap_repl_winbar(true) },
|
||||
}
|
||||
|
||||
M.inactive_winbar = {
|
||||
lualine_a = { { "filename", file_status = false } },
|
||||
lualine_b = { get_dap_repl_winbar(false) },
|
||||
}
|
||||
|
||||
return M
|
|
@ -1,81 +0,0 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- Setup --
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false,
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Git Change type Icon --
|
||||
added = "✚",
|
||||
modified = "",
|
||||
deleted = "✖",
|
||||
renamed = "",
|
||||
-- Git Status type Icon --
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
},
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = false,
|
||||
},
|
||||
filesystem = {
|
||||
hijack_netrw_behavior = "open_default",
|
||||
},
|
||||
-- Keybinding --
|
||||
window = {
|
||||
mappings = {
|
||||
["<space>"] = "open",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Dignostic Icons --
|
||||
vim.fn.sign_define("DiagnosticSignError", {
|
||||
text = " ",
|
||||
texthl = "DiagnosticSignError",
|
||||
})
|
||||
vim.fn.sign_define("DiagnosticSignWarn", {
|
||||
text = " ",
|
||||
texthl = "DiagnosticSignWarn",
|
||||
})
|
||||
vim.fn.sign_define("DiagnosticSignInfo", {
|
||||
text = " ",
|
||||
texthl = "DiagnosticSignInfo",
|
||||
})
|
||||
vim.fn.sign_define("DiagnosticSignHint", {
|
||||
text = "",
|
||||
texthl = "DiagnosticSignHint",
|
||||
})
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>ft",
|
||||
":Neotree toggle reveal left<CR>",
|
||||
{ desc = "Toggle File Tree" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fo",
|
||||
":Neotree buffers reveal float<CR>",
|
||||
{ desc = "Show Open Files" }
|
||||
)
|
||||
end,
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
-- Setup --
|
||||
require("gitsigns").setup()
|
||||
|
||||
-- Keybinding --
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>gh",
|
||||
":Gitsigns preview_hunk_inline<CR>",
|
||||
{ desc = "Toggle Inline Git Diff" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>gb",
|
||||
":Gitsigns toggle_current_line_blame<CR>",
|
||||
{ desc = "Toggle Inline Git Blame" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>go",
|
||||
":Git <CR>",
|
||||
{ desc = "Open Git" }
|
||||
)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"moyiz/git-dev.nvim",
|
||||
lazy = true,
|
||||
cmd = { "GitDevOpen", "GitDevCleanAll" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
require("which-key").setup({})
|
||||
end,
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- Setup --
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("ui-select")
|
||||
|
||||
-- Keybinding --
|
||||
local function setTelescopeBinding(
|
||||
mode,
|
||||
keymap,
|
||||
method,
|
||||
search_global,
|
||||
description
|
||||
)
|
||||
local function binding()
|
||||
local path = search_global and "~"
|
||||
or require("neo-tree.sources.manager").get_state(
|
||||
"filesystem"
|
||||
).path
|
||||
method({ search_dirs = { path } })
|
||||
end
|
||||
vim.keymap.set(mode, keymap, binding, { desc = description })
|
||||
end
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
|
||||
setTelescopeBinding(
|
||||
"n",
|
||||
"<leader>ff",
|
||||
telescope.find_files,
|
||||
false,
|
||||
"Find File"
|
||||
)
|
||||
setTelescopeBinding(
|
||||
"n",
|
||||
"<leader>fz",
|
||||
telescope.live_grep,
|
||||
false,
|
||||
"Fuzzy Find"
|
||||
)
|
||||
setTelescopeBinding(
|
||||
"n",
|
||||
"<leader>gff",
|
||||
telescope.find_files,
|
||||
true,
|
||||
"Global Find File"
|
||||
)
|
||||
setTelescopeBinding(
|
||||
"n",
|
||||
"<leader>gfz",
|
||||
telescope.live_grep,
|
||||
true,
|
||||
"Global Fuzzy Find"
|
||||
)
|
||||
end,
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"nvimdev/lspsaga.nvim",
|
||||
},
|
||||
after = "rcarriga/nvim-dap-ui",
|
||||
config = function()
|
||||
-- Setup --
|
||||
local lspsaga_breadcrumbs = require("lspsaga.symbol.winbar").get_bar
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
"neo-tree",
|
||||
"fugitive",
|
||||
"help",
|
||||
statusline = {
|
||||
"dap-repl",
|
||||
"dapui_console",
|
||||
"dapui_console",
|
||||
"dapui_watches",
|
||||
"dapui_stacks",
|
||||
"dapui_breakpoints",
|
||||
"dapui_scopes",
|
||||
},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "diagnostics" },
|
||||
lualine_c = { lspsaga_breadcrumbs },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = { "diff", "branch" },
|
||||
lualine_z = { "filetype" },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "diagnostics" },
|
||||
lualine_c = {},
|
||||
lualine_x = { "location" },
|
||||
lualine_y = { "diff", "branch" },
|
||||
lualine_z = { "filetype" },
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {
|
||||
lualine_a = { "filename" },
|
||||
},
|
||||
inactive_winbar = {
|
||||
lualine_a = { "filename" },
|
||||
},
|
||||
extensions = {
|
||||
require("plugins.extension.status_bar_plugin"),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function() require("barbar").setup() end,
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Set Theme --
|
||||
vim.cmd("colorscheme catppuccin")
|
||||
end,
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
local Finder = {}
|
||||
|
||||
Finder = {}
|
||||
|
||||
local function is_ignored(entry, ignore_dot_dirs, ignored_dirs)
|
||||
if entry == ".." or entry == "." then
|
||||
return true
|
||||
end
|
||||
|
||||
if ignore_dot_dirs and string.match(entry, "^%.") then
|
||||
return true
|
||||
end
|
||||
|
||||
for _, dir in ipairs(ignored_dirs) do
|
||||
if entry == dir or string.find(entry, dir, 1, true) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
local function read_dir(dir)
|
||||
local handle = io.popen('ls -a "' .. dir .. '"')
|
||||
if not handle then
|
||||
return nil
|
||||
end
|
||||
local result = handle:read("*a")
|
||||
handle:close()
|
||||
return result
|
||||
end
|
||||
|
||||
local function is_dir(path)
|
||||
local f = io.open(path, "r")
|
||||
if f == nil then
|
||||
return false
|
||||
end
|
||||
local _, _, code = f:read(1)
|
||||
f:close()
|
||||
return code == 21
|
||||
end
|
||||
|
||||
local function find_path_recursive(_dir, options)
|
||||
-- Check max Depth
|
||||
if options.current_depth > options.max_depth then
|
||||
return nil
|
||||
end
|
||||
|
||||
local entries = read_dir(_dir)
|
||||
if entries == nil then
|
||||
return nil
|
||||
end
|
||||
|
||||
for entry in string.gmatch(entries, "[^\r\n]+") do
|
||||
-- Check Ignored
|
||||
if is_ignored(entry, options.ignore_dot_dirs, options.ignored_dirs) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
local full_path = _dir .. "/" .. entry
|
||||
|
||||
-- Check for File
|
||||
if entry == options.needle_file then
|
||||
return full_path
|
||||
end
|
||||
|
||||
-- Check is Dir
|
||||
if not is_dir(full_path) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
-- Recursive Call
|
||||
options.current_depth = options.current_depth + 1
|
||||
local result = find_path_recursive(full_path, options)
|
||||
if result ~= nil then
|
||||
return result
|
||||
end
|
||||
|
||||
-- Cleanup
|
||||
options.current_depth = options.current_depth - 1
|
||||
:: continue ::
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
local function get_opened_folder()
|
||||
local cwd = vim.fn.getcwd()
|
||||
local file_path = vim.fn.expand('%:p:h')
|
||||
|
||||
if file_path ~= '' then
|
||||
return file_path
|
||||
end
|
||||
return cwd
|
||||
end
|
||||
|
||||
function Finder.find_project_dir(needle_file, max_depth, priority_dirs, ignored_dirs, ignore_dot_dirs)
|
||||
local options = {
|
||||
needle_file = needle_file,
|
||||
max_depth = max_depth,
|
||||
priority_dirs = priority_dirs,
|
||||
ignored_dirs = ignored_dirs,
|
||||
ignore_dot_dirs = ignore_dot_dirs,
|
||||
current_depth = 0
|
||||
}
|
||||
|
||||
local dir = get_opened_folder()
|
||||
local file = find_path_recursive(dir, options)
|
||||
if file == nil then
|
||||
return nil
|
||||
end
|
||||
return file:match("(.*/)")
|
||||
end
|
||||
|
||||
return Finder
|
|
@ -1,7 +0,0 @@
|
|||
column_width = 80
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 4
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "Always"
|
||||
collapse_simple_statement = "FunctionOnly"
|
Loading…
Reference in a new issue