(neovim) switch to own configuration

This commit is contained in:
Bartek Stalewski 2025-06-28 14:33:33 +02:00
parent 957ec52ca8
commit 977453fa05
No known key found for this signature in database
51 changed files with 1145 additions and 358 deletions

View file

@ -0,0 +1,64 @@
return {
{ "L3MON4D3/LuaSnip", keys = {} },
{
"saghen/blink.cmp",
dependencies = {
"rafamadriz/friendly-snippets",
},
version = "*",
config = function()
require("blink.cmp").setup({
snippets = { preset = "luasnip" },
signature = { enabled = true },
appearance = {
use_nvim_cmp_as_default = false,
nerd_font_variant = "normal",
},
sources = {
default = { "lsp", "path", "snippets", "buffer" },
providers = {
cmdline = {
min_keyword_length = 2,
},
},
},
keymap = {
["<Tab>"] = { "accept", "fallback" },
},
cmdline = {
enabled = false,
completion = { menu = { auto_show = true } },
keymap = {
["<Tab>"] = { "accept_and_enter", "fallback" },
},
},
completion = {
menu = {
border = nil,
scrolloff = 1,
scrollbar = false,
draw = {
columns = {
{ "kind_icon" },
{ "label", "label_description", gap = 1 },
{ "kind" },
{ "source_name" },
},
},
},
documentation = {
window = {
border = nil,
scrollbar = false,
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,EndOfBuffer:BlinkCmpDoc",
},
auto_show = true,
auto_show_delay_ms = 500,
},
},
})
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
}

View file

@ -0,0 +1,18 @@
return {
"stevearc/conform.nvim",
opts = {},
config = function()
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
terraform = { "terraform_fmt" },
tf = { "terraform_fmt" },
["terraform-vars"] = { "terraform_fmt" },
},
format_on_save = {
lsp_fallback = true,
async = false,
},
})
end,
}

View file

@ -1,11 +0,0 @@
return {
{ "akinsho/bufferline.nvim", enabled = false },
{ "catppuccin/nvim", enabled = false },
{ "folke/persistence.nvim", enabled = false },
{ "folke/tokyonight.nvim", enabled = false },
{ "folke/trouble.nvim", enabled = false },
{ "MagickDuck/grug-far.nvim", enabled = false },
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
{ "todo-comments.nvim", enabled = false },
{ "windwp/nvim-ts-autotag", enabled = false },
}

View file

@ -0,0 +1,22 @@
return {
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
signs_staged = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
},
})
end,
}

View file

@ -1,10 +0,0 @@
return {
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"lua-language-server",
"terraform-ls",
"tflint",
},
},
}

View file

@ -1,40 +1,60 @@
return {
"nvim-lualine/lualine.nvim",
opts = {
options = {
theme = "powerline",
section_separators = "",
component_separators = "",
globalstatus = false,
},
sections = {
lualine_c = {
{
"diagnostics",
symbols = {
error = LazyVim.config.icons.diagnostics.Error,
warn = LazyVim.config.icons.diagnostics.Warn,
info = LazyVim.config.icons.diagnostics.Info,
hint = LazyVim.config.icons.diagnostics.Hint,
},
},
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
{ "filename", file_status = true, path = 1 },
},
lualine_x = {
{
"diff",
symbols = {
added = LazyVim.config.icons.git.added,
modified = LazyVim.config.icons.git.modified,
removed = LazyVim.config.icons.git.removed,
},
},
},
lualine_z = {},
},
tabline = {
lualine_a = { "buffers" },
},
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
require("lualine").setup({
options = {
theme = "monokai-pro",
section_separators = "",
component_separators = "",
globalstatus = false,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = {
{
"diff",
symbols = {
added = "",
modified = "",
removed = "",
},
},
{
"diagnostics",
symbols = {
error = "",
warn = "",
info = "",
hint = "",
},
},
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
{ "filename", file_status = true, path = 1 },
},
lualine_x = {
{
"lsp_status",
symbols = {
spinner = { "", "", "", "", "", "", "", "", "", "" },
done = "",
separator = " ",
},
},
},
lualine_y = {
{ "searchcount" },
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
{ "location", padding = { left = 0, right = 1 } },
},
lualine_z = {},
},
tabline = {
lualine_a = { "buffers" },
},
})
end,
}

View file

@ -0,0 +1,45 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
cmd = "Mason",
keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
build = ":MasonUpdate",
opts = {
ensure_installed = {
"lua-language-server",
"terraform-ls",
"stylua",
},
},
config = function(_, opts)
require("mason").setup(opts)
local mr = require("mason-registry")
local function ensure_installed()
for _, tool in ipairs(opts.ensure_installed) do
if mr.has_package(tool) then
local p = mr.get_package(tool)
if not p:is_installed() then
vim.notify("Mason: Installing " .. tool .. "...", vim.log.levels.INFO)
p:install():once("closed", function()
if p:is_installed() then
vim.notify("Mason: Successfully installed " .. tool, vim.log.levels.INFO)
else
vim.notify("Mason: Failed to install " .. tool, vim.log.levels.ERROR)
end
end)
end
else
vim.notify("Mason: Package '" .. tool .. "' not found", vim.log.levels.WARN)
end
end
end
if mr.refresh then
mr.refresh(ensure_installed)
else
ensure_installed()
end
end,
},
}

View file

@ -0,0 +1,12 @@
return {
"echasnovski/mini.pairs",
config = function()
require("mini.pairs").setup({
modes = { insert = true, command = true, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
skip_ts = { "string" },
skip_unbalanced = true,
markdown = true,
})
end,
}

View file

@ -1,15 +1,10 @@
return {
{
"loctvl842/monokai-pro.nvim",
priority = 1000,
opts = {
"loctvl842/monokai-pro.nvim",
priority = 10000,
config = function()
require("monokai-pro").setup({
filter = "classic",
},
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "monokai-pro",
},
},
})
vim.cmd.colorscheme("monokai-pro")
end,
}

View file

@ -0,0 +1,27 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
},
config = function()
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
messages = {
view_search = false,
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
lsp_doc_border = true,
},
})
end,
}

View file

@ -1,28 +1,47 @@
return {
"folke/snacks.nvim",
opts = {
dashboard = { enabled = false },
},
keys = {
{
"<leader>n",
function()
vim.cmd("set number!")
vim.cmd('execute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")')
if Snacks.indent.enabled then
Snacks.indent.disable()
else
Snacks.indent.enable()
end
end,
desc = "Toggle Decorations",
},
{
"<leader>e",
function()
Snacks.explorer()
end,
desc = "File Explorer",
},
},
priority = 1000,
lazy = false,
config = function()
require("snacks").setup({
animate = { enabled = false },
bigfile = { enabled = false },
bufdelete = { enabled = true },
dashboard = { enabled = false },
debug = { enabled = false },
dim = { enabled = false },
explorer = { enabled = true, replace_netrw = true },
git = { enabled = false },
gitbrowse = { enabled = false },
image = { enabled = false },
indent = { enabled = true },
input = { enabled = true },
layout = { enabled = false },
lazygit = { enabled = false },
notifier = { enabled = true },
notify = { enabled = true },
picker = {
enabled = true,
files = {
hidden = true,
ignored = true,
},
hidden = true,
ignored = true,
},
profiler = { enabled = false },
quickfile = { enabled = true },
rename = { enabled = false },
scope = { enabled = true },
scratch = { enabled = false },
scroll = { enabled = true },
statuscolumn = { enabled = false },
terminal = { enabled = true },
toggle = { enabled = false },
util = { enabled = true },
win = { enabled = false },
words = { enabled = false },
zen = { enabled = false },
})
end,
}

View file

@ -1,18 +1,25 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"diff",
"gotmpl",
"helm",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"terraform",
"vim",
},
},
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"diff",
"gotmpl",
"hcl",
"helm",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"regex",
"terraform",
"vim",
},
highlight = { enable = true },
indent = { enable = true },
})
end,
}

View file

@ -1,35 +1,36 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
opts_extend = { "spec" },
opts = {
preset = "helix",
icons = {
mappings = false,
},
defaults = {},
spec = {
{
mode = { "n", "v" },
{
"<leader>b",
group = "buffer",
expand = function()
return require("which-key.extras").expand.buf()
end,
},
{ "<leader><tab>", group = "tabs", hidden = true },
{ "<leader>d", group = "debug", hidden = true },
{ "<leader>dp", group = "profiler", hidden = true },
{ "<leader>gh", group = "hunks", hidden = true },
{ "<leader>q", group = "quit/session", hidden = true },
{ "<leader>s", group = "search", hidden = true },
{ "<leader>t", hidden = true },
{ "<leader>u", group = "ui", hidden = true },
{ "<leader>w", hidden = true },
{ "<leader>x", group = "diagnostics/quickfix", hidden = true },
{ "gx", desc = "Open with system app", hidden = true },
config = function()
require("which-key").setup({
preset = "helix",
delay = 300,
icons = {
rules = false,
breadcrumb = "",
separator = "󱦰 ",
group = "󰹍 ",
},
},
},
plugins = {
spelling = {
enabled = false,
},
},
win = {
height = {
max = math.huge,
},
},
spec = {
{
mode = { "n", "v" },
{ "<leader>b", group = "buffer" },
{ "<leader>c", group = "code" },
{ "<leader>f", group = "find" },
{ "<leader>h", group = "history" },
{ "<leader>u", group = "ui" },
},
},
})
end,
}