restructured nvim config
This commit is contained in:
parent
22d4936a21
commit
6bb0e86ded
9 changed files with 148 additions and 147 deletions
|
@ -1,37 +1,32 @@
|
|||
return {
|
||||
{ "rose-pine/neovim" },
|
||||
{ "sontungexpt/witch" },
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "rose-pine/neovim" },
|
||||
{ "sontungexpt/witch" },
|
||||
{ 'AlexvZyl/nordic.nvim' },
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
lazy = false,
|
||||
-- priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
config = function()
|
||||
require("bamboo").setup({
|
||||
-- ────────────────────────────< optional configuration here >─────────────────────────
|
||||
code_style = {
|
||||
comments = { italic = false, bold = true },
|
||||
conditionals = { italic = true },
|
||||
keywords = { bold = true },
|
||||
functions = {},
|
||||
namespaces = { italic = true },
|
||||
parameters = { italic = true },
|
||||
strings = {},
|
||||
variables = { bold = true },
|
||||
},
|
||||
-- ─< Custom Highlights -- >────────────────────────────────────────────────────────────
|
||||
colors = {}, -- Override default colors
|
||||
highlights = { -- Override highlight groups
|
||||
["@comment"] = { fg = "#555653" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"eldritch-theme/eldritch.nvim",
|
||||
lazy = false,
|
||||
opts = {},
|
||||
}
|
||||
|
||||
{ "eldritch-theme/eldritch.nvim" },
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
lazy = false,
|
||||
-- priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
config = function()
|
||||
require("bamboo").setup({
|
||||
-- ────────────────────────────< optional configuration here >─────────────────────────
|
||||
code_style = {
|
||||
comments = { italic = false, bold = true },
|
||||
conditionals = { italic = true },
|
||||
keywords = { bold = true },
|
||||
functions = {},
|
||||
namespaces = { italic = true },
|
||||
parameters = { italic = true },
|
||||
strings = {},
|
||||
variables = { bold = true },
|
||||
},
|
||||
-- ─< Custom Highlights -- >────────────────────────────────────────────────────────────
|
||||
colors = {}, -- Override default colors
|
||||
highlights = { -- Override highlight groups
|
||||
["@comment"] = { fg = "#555653" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3,45 +3,80 @@ return{
|
|||
"nvimdev/dashboard-nvim",
|
||||
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
||||
opts = function()
|
||||
-- local logo = [[
|
||||
-- ▐ ▄ ▄▄▄ . ▌ ▐·▪ • ▌ ▄ ·.
|
||||
-- •█▌▐█▀▄.▀·▪ ▪█·█▌██ ·██ ▐███▪
|
||||
-- ▐█▐▐▌▐▀▀▪▄ ▄█▀▄ ▐█▐█•▐█·▐█ ▌▐▌▐█·
|
||||
-- ██▐█▌▐█▄▄▌▐█▌.▐▌ ███ ▐█▌██ ██▌▐█▌
|
||||
-- ▀▀ █▪ ▀▀▀ ▀█▄▀▪. ▀ ▀▀▀▀▀ █▪▀▀▀
|
||||
-- ]]
|
||||
|
||||
local logo = [[
|
||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
||||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
||||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||
|
||||
████ ██████ █████ ██
|
||||
███████████ █████
|
||||
█████████ ███████████████████ ███ ███████████
|
||||
█████████ ███ █████████████ █████ ██████████████
|
||||
█████████ ██████████ █████████ █████ █████ ████ █████
|
||||
███████████ ███ ███ █████████ █████ █████ ████ █████
|
||||
██████ █████████████████████ ████ █████ █████ ████ ██████
|
||||
]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
-- this is taken care of by lualine
|
||||
-- enabling this messes up the actual laststatus setting after loading a file
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
-- stylua: ignore
|
||||
center = {
|
||||
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
||||
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" },
|
||||
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" },
|
||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
center = {
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").find_files()
|
||||
end,
|
||||
desc = " Find File",
|
||||
icon = " ",
|
||||
key = "f"
|
||||
},
|
||||
}
|
||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").oldfiles()
|
||||
end,
|
||||
desc = " Recent Files",
|
||||
icon = " ",
|
||||
key = "r"
|
||||
},
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").live_grep()
|
||||
end,
|
||||
desc = " Find Text",
|
||||
icon = " ",
|
||||
key = "g"
|
||||
},
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end,
|
||||
desc = " Search Neovim files",
|
||||
icon = " ",
|
||||
key = "c"
|
||||
},
|
||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
for _, button in ipairs(opts.config.center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
|
@ -73,6 +108,7 @@ return{
|
|||
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
||||
{ "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||
{ "<leader>db", "<cmd>:Dashboard<CR>", desc = "Dashboard"}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,9 +34,14 @@ return {
|
|||
"svelte",
|
||||
"lua_ls",
|
||||
"graphql",
|
||||
"typos-lsp",
|
||||
"emmet_ls",
|
||||
"prismals",
|
||||
"pyright",
|
||||
"lemminx",
|
||||
"hyprls",
|
||||
"textlsp",
|
||||
"yamlls",
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -44,8 +49,6 @@ return {
|
|||
ensure_installed = {
|
||||
"prettier", -- prettier formatter
|
||||
"stylua", -- lua formatter
|
||||
-- "isort", -- python formatter
|
||||
-- "black", -- python formatter
|
||||
"pylint",
|
||||
"eslint_d",
|
||||
},
|
|
@ -47,7 +47,7 @@ return {
|
|||
return {
|
||||
sources = { "filesystem", "buffers", "git_status" },
|
||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||
close_if_last_window = false,
|
||||
close_if_last_window = true,
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
|
@ -62,23 +62,17 @@ return {
|
|||
window = {
|
||||
mappings = {
|
||||
["l"] = "open",
|
||||
["o"] = "open",
|
||||
["C-v"] = "open_split",
|
||||
["h"] = "close_node",
|
||||
["<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",
|
||||
},
|
||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||
["P"] = { "toggle_preview", config = { use_float = true } },
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
|
|
|
@ -2,14 +2,14 @@ return {
|
|||
"rcarriga/nvim-notify",
|
||||
config = function()
|
||||
require("notify").setup({
|
||||
stages = "fade_in_slide_out",
|
||||
stages = "slide",
|
||||
background_colour = "FloatShadow",
|
||||
max_width = 60,
|
||||
max_width = 120,
|
||||
timeout = 2750,
|
||||
render = "compact",
|
||||
render = "wrapped-compact",
|
||||
-- Minimum/Maximum width for notification windows
|
||||
minimum_width = 30,
|
||||
maximum_width = 60,
|
||||
maximum_width = 120,
|
||||
|
||||
-- Function called when a new window is opened, use for changing win settings/config
|
||||
on_open = nil,
|
||||
|
|
|
@ -1,65 +1,37 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup({ -- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
comments = { color = { "#333" }, italic = false }, -- adjust comment color and style
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"fish",
|
||||
"http",
|
||||
"html",
|
||||
"php",
|
||||
"css",
|
||||
"scss",
|
||||
"gitignore",
|
||||
"git_config",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"dockerfile",
|
||||
"yaml",
|
||||
"json",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"graphql",
|
||||
"lua",
|
||||
"query",
|
||||
"c",
|
||||
"prisma",
|
||||
"hyprlang",
|
||||
"ini",
|
||||
"passwd",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
autotag = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash", "fish", "http", "html", "php", "css", "scss",
|
||||
"gitignore", "git_config", "markdown", "markdown_inline",
|
||||
"dockerfile", "yaml", "json", "javascript", "typescript",
|
||||
"graphql", "lua", "query", "c", "prisma", "hyprlang",
|
||||
"ini", "passwd", "vim", "vimdoc",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
-- Add these fields to address the error
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ return {
|
|||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 500
|
||||
vim.o.timeoutlen = 350
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue