1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-17 11:30:02 +02:00

new nvim config

This commit is contained in:
Henrik Hautakoski 2024-05-06 16:07:18 +02:00
parent 4b730d3924
commit 7388c9bfd3
78 changed files with 1291 additions and 43 deletions

View file

@ -0,0 +1,34 @@
local icons = require('config.icons')
return {
'romgrk/barbar.nvim',
dependencies = {
'lewis6991/gitsigns.nvim',
'nvim-tree/nvim-web-devicons',
},
init = function() vim.g.barbar_auto_setup = false end,
opts = {
animation = false,
auto_hide = 0,
focus_on_close = 'previous',
button = icons.close,
highlight_inactive_file_icons = true,
icons = {
separator = { left = '', right = '' },
separator_at_end = false,
inactive = { button = '', separator = { left = '', right = '' } },
modified = { button = icons.gitsigns.modified },
pinned = { button = icons.pinned, filename = true },
gitsigns = {
added = { enabled = false },
changed = { enabled = false },
deleted = { enabled = false },
}
},
maximum_padding = 2,
minimum_padding = 1,
sidebar_filetypes = {
--['neo-tree'] = {event = 'BufWipeout'},
}
},
}

View file

@ -0,0 +1,6 @@
return {
'akinsho/bufferline.nvim',
version = "*",
dependencies = 'nvim-tree/nvim-web-devicons',
opts = require('config.plugins.bufferline')
}

View file

@ -0,0 +1,10 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = require('config.plugins.catppuccin'),
config = function(_, opts)
require("catppuccin").setup(opts)
vim.cmd.colorscheme("catppuccin")
end
}

View file

@ -0,0 +1,92 @@
return {
"navarasu/onedark.nvim",
lazy = false,
priority = 1000,
opts = {
style = 'deep',
code_style = {
comments = 'none',
keywords = 'none',
functions = 'none',
strings = 'none',
variables = 'none'
},
-- colors = {
-- fg = '#b3b1b1',
-- bg0 = '#171b26',
-- bg1 = '#30323b',
-- bg2 = '#24262f',
-- bg3 = '#383a43',
-- bg_d = "#1f2129",
-- bg_blue = "#ff00ff",
-- bg_yellow = "#f0d197",
-- red = '#cc4a33',
-- green = '#51cc7f',
-- yellow = '#ccaf33',
-- orange = '#ccab1f',
-- -- blue = '#3390cc',
-- cyan = '#33ccb7',
-- purple = '#9233cc',
-- dark_cyan = "#8abeb7",
-- dark_red = "#cc817f",
-- dark_yellow = "#ffcc99",
-- dark_purple = "#9999cc",
-- },
-- highlights = {
-- LineNr = { fg = "$light_grey" },
-- CursorLineNr = { fg = "$blue" },
--
-- Pmenu = { bg = "$bg2" },
-- PmenuSel = { bg = "$bg_d", fg = "$fg" },
-- FloatBorder = { fg = "$grey", bg = 'None' },
-- -- Syntax
-- ["@comment"] = { fg = "$red" },
-- ["@string"] = { fg = "$purple" },
-- ["@function"] = { fg = "$fg" },
-- ["@keyword"] = { fg = "$yellow" },
-- ["@keyword.import"] = { fg = "$yellow" },
-- ["@keyword.function"] = { fg = "$yellow" },
-- ["@keyword.conditional"] = { fg = "$yellow" },
-- ["@keyword.operator"] = { fg = "$yellow" },
-- ["@keyword.repeat"] = { fg = "$yellow" },
-- ["@constant"] = { fg = "$green" },
-- ["@tag"] = { fg = "$yellow" },
-- ["@tag.delimiter"] = { fg = "$yellow" },
-- ["@tag.attribute"] = { fg = "$yellow" },
-- ["@type"] = { fg = "$blue" },
-- ["@type.qualifier"] = { fg = "$yellow" },
-- ["@type.definition"] = { fg = "$blue" },
-- ["@type.builtin"] = { fg = "$blue" },
-- ["@function.method"] = { fg = "$fg" },
-- ["@function.call"] = { fg = "$fg" },
-- ["@function.builtin"] = { fg = "$fg" },
--
-- ["@number"] = { fg = "$red" },
-- ["@variable"] = { fg = "$green" },
-- ["@variable.member"] = { fg = "$green" },
-- ["@variable.builtin"] = { fg = "$green" },
-- ["@variable.parameter"] = { fg = "$fg" },
-- ["@property"] = { fg = "$orange" },
-- -- ["@property"] = { fg = "$fg" },
-- ["@punctuation.delimiter"] = { fg = "$fg" },
-- ["@punctuation.bracket"] = { fg = "$fg" },
-- ["@module"] = { fg = "$fg" },
--
-- -- php overrides
-- ["@class_name.php"] = { fg = "$fg" },
-- ["@extend_name.php"] = { fg = "$fg" },
-- ["@implements_name.php"] = { fg = "$fg" },
-- ["@namespace_name.php"] = { fg = "$fg" },
-- ["@namespace_alias.php"] = { fg = "$fg" },
-- }
},
config = function(_, opts)
local c = require('onedark')
c.setup(opts)
c.load()
-- vim.cmd(string.format("highlight GitSignsAdd guifg='%s'", opts.colors.green))
-- vim.cmd(string.format("highlight GitSignsChange guifg='%s'", opts.colors.yellow))
-- vim.cmd(string.format("highlight GitSignsDelete guifg='%s'", opts.colors.red))
end
}

View file

@ -0,0 +1,40 @@
local logo = [[
::::::::: :::: ::: ::: :::
:+: :+: :+:+: :+: :+: :+:
+:+ +:+ :+:+:+ +:+ +:+ +:+
+#++:++#+ +#+ +:+ +#+ +#++:+
+#+ +#+ +#+#+# +#+ +#+
#+# #+# #+#+# #+# #+#
### ### #### ### ###
]]
logo = string.rep("\n", 8) .. logo .. "\n\n"
return {
'nvimdev/dashboard-nvim',
name = 'dashboard',
dependencies = {
'nvim-tree/nvim-web-devicons'
},
event = 'VimEnter',
opts = {
theme = 'doom',
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 = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = "qa", desc = " Quit", icon = "", key = "q" }
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return { "Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
end,
}
}
}

View file

@ -0,0 +1,23 @@
return {
'stevearc/dressing.nvim',
opts = {
input = {
title_pos = "center",
border = "single",
relative = "win",
},
select = {
backend = { "telescope", "builtin" },
telescope = require('telescope.themes').get_dropdown({
borderchars = {
prompt = { "", "", "", "", "", "", "", "" },
results = { "", "", "", "", "", "", "", "" },
},
max_height = 5
}),
builtin = {
border = "single",
}
}
},
}

View file

@ -0,0 +1,33 @@
return {
"folke/edgy.nvim",
event = "VeryLazy",
keys = {
{ "<leader>ue", function() require("edgy").toggle() end, desc = "Edgy Toggle" },
-- stylua: ignore
{ "<leader>uE", function() require("edgy").select() end, desc = "Edgy Select Window" },
},
opts = {
left = {
{
title = "Neo-Tree",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "filesystem"
end,
size = { height = 0.5 },
},
{
title = "Test",
ft = "neotest-summary"
},
"neo-tree",
},
options = {
left = { size = 40 }
},
animate = {
enabled = false,
},
exit_when_last = false
}
}

View file

@ -0,0 +1,31 @@
local icons = require('config.icons').diff_gutter
return {
'lewis6991/gitsigns.nvim',
dependencies = {
{
"folke/which-key.nvim",
optional = true,
opts = {
defaults = {
["<leader>g"] = { name = "+git" },
},
},
},
},
lazy = false,
keys = {
{ '<leader>gp', '<cmd>Gitsigns preview_hunk<cr>', desc = 'Git preview diff' },
{ '<leader>gb', '<cmd>Gitsigns blame_line<cr>', desc = 'Git blame' }
},
opts = {
signs = {
add = { text = icons.add },
delete = { text = icons.delete },
change = { text = icons.change },
untracked = { text = icons.untracked },
topdelete = { text = icons.delete },
changedelete = { text = icons.change },
},
},
}

View file

@ -0,0 +1,9 @@
return {
'nvim-lualine/lualine.nvim',
event = "VeryLazy",
dependencies = {
'arkav/lualine-lsp-progress',
'nvim-tree/nvim-web-devicons',
},
opts = require("config.plugins.lualine")
}

View file

@ -0,0 +1,13 @@
return {
'nvim-neo-tree/neo-tree.nvim',
cmd = 'Neotree',
keys = {
{ '<leader>Fe', ':Neotree reveal toggle<CR>', desc = 'Toggle File Explorer'},
},
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
"nvim-lua/plenary.nvim",
},
opts = require('config.plugins.neo-tree')
}

View file

@ -0,0 +1,14 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = require('config.plugins.which-key'),
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults or {})
end
}