restructured nvim config

This commit is contained in:
pika 2024-08-18 13:51:43 +02:00
parent 22d4936a21
commit 6bb0e86ded
9 changed files with 148 additions and 147 deletions

View file

@ -26,10 +26,11 @@ require("lazy").setup({
spec = {
-- import your plugins
{ import = "pika.plugins" },
{ import = "pika.plugins.lsp" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "eldritch" } },
install = { colorscheme = { "nord" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View file

@ -1,7 +1,9 @@
return {
{ "folke/tokyonight.nvim" },
{ "rose-pine/neovim" },
{ "sontungexpt/witch" },
{ 'AlexvZyl/nordic.nvim' },
{ "eldritch-theme/eldritch.nvim" },
{
"ribru17/bamboo.nvim",
lazy = false,
@ -27,11 +29,4 @@ return {
})
end,
},
{
"eldritch-theme/eldritch.nvim",
lazy = false,
opts = {},
}
}

View file

@ -3,13 +3,23 @@ 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"
@ -17,23 +27,48 @@ return{
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 = 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" },
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
@ -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"}
},
}
}

View file

@ -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",
},

View file

@ -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 = {

View file

@ -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,

View file

@ -6,49 +6,19 @@ return {
"windwp/nvim-ts-autotag",
},
config = function()
-- import nvim-treesitter plugin
local treesitter = require("nvim-treesitter.configs")
-- configure treesitter
treesitter.setup({ -- enable syntax highlighting
require("nvim-treesitter.configs").setup({
highlight = {
enable = true,
comments = { color = { "#333" }, italic = false }, -- adjust comment color and style
additional_vim_regex_highlighting = false,
},
-- enable indentation
indent = { enable = true },
-- enable autotagging (w/ nvim-ts-autotag plugin)
autotag = {
enable = true,
},
-- ensure these language parsers are installed
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",
"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,
@ -59,7 +29,9 @@ return {
node_decremental = "<bs>",
},
},
-- Add these fields to address the error
sync_install = true,
auto_install = true,
})
end,
}

View file

@ -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