New nvim config, add mangohud
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
@@ -8,13 +9,12 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
-- { import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
@@ -26,7 +26,7 @@ require("lazy").setup({
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
-- install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
|
||||
@@ -6,4 +6,5 @@ LazyVim.terminal.setup("fish")
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
opt.mouse = ""
|
||||
opt.mouse = "a"
|
||||
opt.termguicolors = true
|
||||
|
||||
4
config/nvim_old/lua/plugins/colorizer.lua
Normal file
4
config/nvim_old/lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
},
|
||||
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
return {
|
||||
"lukas-reineke/headlines.nvim",
|
||||
opts = function()
|
||||
local opts = {}
|
||||
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
|
||||
opts[ft] = {
|
||||
headline_highlights = {},
|
||||
-- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66
|
||||
bullets = {},
|
||||
}
|
||||
for i = 1, 6 do
|
||||
local hl = "Headline" .. i
|
||||
vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true })
|
||||
table.insert(opts[ft].headline_highlights, hl)
|
||||
end
|
||||
end
|
||||
return opts
|
||||
end,
|
||||
ft = { "markdown", "norg", "rmd", "org" },
|
||||
config = function(_, opts)
|
||||
-- PERF: schedule to prevent headlines slowing down opening a file
|
||||
vim.schedule(function()
|
||||
require("headlines").setup(opts)
|
||||
require("headlines").refresh()
|
||||
end)
|
||||
end,
|
||||
}
|
||||
15
config/nvim_old/lua/plugins/lazyvim.lua
Normal file
15
config/nvim_old/lua/plugins/lazyvim.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
dependencies = {
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
},
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
"<cmd>MarkdownPreviewToggle<cr>",
|
||||
desc = "Markdown Preview",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.cmd([[do FileType]])
|
||||
end,
|
||||
}
|
||||
@@ -1,16 +1,17 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"vue-language-server",
|
||||
"biome",
|
||||
"ast-grep",
|
||||
"sqlls",
|
||||
"marksman",
|
||||
"markdownlint",
|
||||
"js-debug-adapter",
|
||||
})
|
||||
end,
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash-language-server",
|
||||
"vue-language-server",
|
||||
"dockerfile-language-server",
|
||||
"typescript-language-server",
|
||||
"html-lsp",
|
||||
"marksman",
|
||||
"csharp-language-server",
|
||||
"sqls",
|
||||
"json-lsp",
|
||||
"phpactor"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,50 +1,5 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (Root Dir)",
|
||||
},
|
||||
{
|
||||
"<leader>fE",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (cwd)",
|
||||
},
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||
{
|
||||
"<leader>ge",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||
end,
|
||||
desc = "Git Explorer",
|
||||
},
|
||||
{
|
||||
"<leader>be",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||
end,
|
||||
desc = "Buffer Explorer",
|
||||
},
|
||||
},
|
||||
deactivate = function()
|
||||
vim.cmd([[Neotree close]])
|
||||
end,
|
||||
init = function()
|
||||
if vim.fn.argc(-1) == 1 then
|
||||
local stat = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stat and stat.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||
@@ -58,53 +13,5 @@ return {
|
||||
hide_gitignored = true,
|
||||
},
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
["<space>"] = "none",
|
||||
["Y"] = {
|
||||
function(state)
|
||||
local node = state.tree:get_node()
|
||||
local path = node:get_id()
|
||||
vim.fn.setreg("+", path, "c")
|
||||
end,
|
||||
desc = "Copy Path to Clipboard",
|
||||
},
|
||||
["O"] = {
|
||||
function(state)
|
||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||
end,
|
||||
desc = "Open with System Application",
|
||||
},
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local function on_move(data)
|
||||
LazyVim.lsp.on_rename(data.source, data.destination)
|
||||
end
|
||||
|
||||
local events = require("neo-tree.events")
|
||||
opts.event_handlers = opts.event_handlers or {}
|
||||
vim.list_extend(opts.event_handlers, {
|
||||
{ event = events.FILE_MOVED, handler = on_move },
|
||||
{ event = events.FILE_RENAMED, handler = on_move },
|
||||
})
|
||||
require("neo-tree").setup(opts)
|
||||
vim.api.nvim_create_autocmd("TermClose", {
|
||||
pattern = "*lazygit",
|
||||
callback = function()
|
||||
if package.loaded["neo-tree.sources.git_status"] then
|
||||
require("neo-tree.sources.git_status").refresh()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,48 +1,38 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
pyright = {},
|
||||
marksman = {},
|
||||
--@type lspconfig.options.tsserver
|
||||
tsserver = {
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.organizeImports.ts" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Organize Imports",
|
||||
},
|
||||
{
|
||||
"<leader>cR",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.removeUnused.ts" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Remove Unused Imports",
|
||||
},
|
||||
},
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
settings = {
|
||||
completions = {
|
||||
completeFunctionCalls = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return {}
|
||||
-- return {
|
||||
-- "neovim/nvim-lspconfig",
|
||||
-- opts = {
|
||||
-- -- LSP Server Settings
|
||||
-- ---@type lspconfig.options
|
||||
-- servers = {
|
||||
-- lua_ls = {
|
||||
-- -- Use this to add any additional keymaps
|
||||
-- -- for specific lsp servers
|
||||
-- ---@type LazyKeysSpec[]
|
||||
-- -- keys = {},
|
||||
-- settings = {
|
||||
-- Lua = {
|
||||
-- workspace = {
|
||||
-- checkThirdParty = false,
|
||||
-- },
|
||||
-- codeLens = {
|
||||
-- enable = true,
|
||||
-- },
|
||||
-- completion = {
|
||||
-- callSnippet = "Replace",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- -- tsserver = {},
|
||||
-- biome = {},
|
||||
-- volar = {
|
||||
-- settings = {},
|
||||
-- },
|
||||
-- pyright = {},
|
||||
-- },
|
||||
-- -- return true if you don't want this server to be setup with lspconfig
|
||||
-- ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
-- setup = {},
|
||||
-- },
|
||||
-- }
|
||||
|
||||
@@ -23,6 +23,11 @@ return {
|
||||
"vue",
|
||||
"xml",
|
||||
"csv",
|
||||
"css",
|
||||
"scss",
|
||||
"dockerfile",
|
||||
"c_sharp",
|
||||
"php"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
13
config/nvim_old/lua/plugins/telescope-fzf-native.lua
Normal file
13
config/nvim_old/lua/plugins/telescope-fzf-native.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user