my neovim configuration

update configs

+3 -6
init.lua
···
-
require "ptero.options"
-
require "ptero.plugins"
-
require "ptero.lsp"
+
require "ptero.lazy"
+
+
require "ptero.theme"
require "ptero.keymaps"
-
require "ptero.theme"
-
require "ptero.autocommands"
-
vim.notify("UwU hai :3", 3)
+9 -18
lazy-lock.json
···
{
-
"catppuccin": { "branch": "main", "commit": "9784b64e84fe2134cc866be3f33cb8194c0c3ede" },
-
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
-
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
-
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
-
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
-
"gitsigns.nvim": { "branch": "main", "commit": "b1f9cf7c5c5639c006c937fc1819e09f358210fc" },
-
"lazy.nvim": { "branch": "main", "commit": "5b4444f0d7e556deba3f7ca949a2ba0e2c3369fb" },
-
"luasnip": { "branch": "master", "commit": "436857749a905b48c1e8205b996639c28f006556" },
-
"mason-lspconfig.nvim": { "branch": "main", "commit": "a81503f0019942111fe464209237f8b4e85f4687" },
-
"mason.nvim": { "branch": "main", "commit": "698cd0c4f10480991e665f31977650858d625af1" },
-
"nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" },
-
"nvim-lspconfig": { "branch": "master", "commit": "4bb0f1845c5cc6465aecedc773fc2d619fcd8faf" },
-
"nvim-notify": { "branch": "master", "commit": "281e4d793c550c866bea3fb85d39de1f0188fb50" },
-
"nvim-treesitter": { "branch": "master", "commit": "e3ebc8ec5d586162f3c408417621daa59ba8ea62" },
-
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
-
"telescope.nvim": { "branch": "master", "commit": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2" },
-
"which-key.nvim": { "branch": "main", "commit": "fb027738340502b556c3f43051f113bcaa7e8e63" }
-
}
+
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
+
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
+
"gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" },
+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
+
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
+
"nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
+
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
+
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }
+
}
-10
lua/ptero/autocommands.lua
···
-
vim.api.nvim_create_autocmd("FileType", {
-
pattern = { "zig" },
-
callback = function()
-
-- tab defaults
-
vim.opt.expandtab = false
-
vim.opt.shiftwidth = 4
-
vim.opt.softtabstop = 4
-
vim.opt.tabstop = 4
-
end,
-
})
-18
lua/ptero/borders.lua
···
-
local b = {
-
tl = "┌", -- top left
-
tr = "┐", -- top right
-
-
bl = "└", -- bottom left
-
br = "┘", -- bottom right
-
-
v = "│", -- vertical
-
h = "─", -- horizontal
-
-
s = "█", -- scroll
-
}
-
-
return {
-
style = "single",
-
bqf = { b.v, b.v, b.h, b.h, b.tl, b.tr, b.bl, b.br, b.s },
-
telescope = { b.h, b.v, b.h, b.v, b.tl, b.tr, b.br, b.bl },
-
}
-18
lua/ptero/configs/catppuccin.lua
···
-
local utils = require("ptero/utils")
-
-
local catppuccin = utils.Load("catppuccin")
-
-
catppuccin.setup({
-
flavour = "mocha",
-
background = {
-
light = "latte",
-
dark = "mocha",
-
},
-
transparent_background = true,
-
integrations = {
-
cmp = true,
-
gitsigns = true,
-
treesitter = true,
-
notify = true,
-
},
-
})
-136
lua/ptero/configs/cmp.lua
···
-
local utils = require("ptero/utils")
-
-
local cmp = utils.Load("cmp")
-
local compare = utils.Load("cmp.config.compare")
-
local luasnip = utils.Load("luasnip")
-
-
require("luasnip.loaders.from_vscode").lazy_load()
-
-
local icons = require("ptero.icons")
-
local border = require("ptero.borders").style
-
-
-- Used by nvim-cmp to override the completion menu popups.
-
-- FloatBorder is removed to leave it as the default.
-
-- Default: "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None"
-
-- NOTE: This is related to the theme. So maybe consider defining this in theme.lua.
-
local winhighlight = "Normal:NormalFloat,CursorLine:Visual,Search:None"
-
-
local source_names = {
-
nvim_lsp = "[LSP]",
-
path = "[P]",
-
luasnip = "[S]",
-
buffer = "[B]",
-
}
-
-
local duplicates = {
-
nvim_lsp = 0,
-
path = 1,
-
luasnip = 1,
-
buffer = 1,
-
}
-
-
local has_words_before = function()
-
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
-
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
-
end
-
-
cmp.setup({
-
preselect = cmp.PreselectMode.None,
-
experimental = {
-
ghost_text = true,
-
},
-
formatting = {
-
fields = { "kind", "abbr", "menu" },
-
format = function(entry, vim_item)
-
vim_item.kind = icons.kind[vim_item.kind]
-
vim_item.menu = source_names[entry.source.name]
-
vim_item.dup = duplicates[entry.source.name] or 0
-
-
local max_width = 80
-
if #vim_item.abbr > max_width then
-
vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. icons.ui.Ellipsis
-
end
-
-
return vim_item
-
end,
-
},
-
snippet = {
-
expand = function(args)
-
luasnip.lsp_expand(args.body)
-
end,
-
},
-
window = {
-
completion = cmp.config.window.bordered({
-
border = border,
-
winhighlight = winhighlight,
-
}),
-
documentation = cmp.config.window.bordered({
-
border = border,
-
winhighlight = winhighlight,
-
}),
-
},
-
sources = {
-
{ name = "nvim_lsp" },
-
{ name = "path" },
-
{ name = "luasnip" },
-
{ name = "buffer" },
-
},
-
sorting = {
-
priority_weight = 2,
-
comparators = {
-
compare.offset,
-
compare.exact,
-
compare.score,
-
compare.recently_used,
-
compare.locality,
-
compare.kind,
-
compare.sort_text,
-
compare.length,
-
compare.order,
-
},
-
},
-
mapping = cmp.mapping.preset.insert({
-
["<C-k>"] = cmp.mapping.select_prev_item(),
-
["<C-j>"] = cmp.mapping.select_next_item(),
-
["<Down>"] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), { "i" }),
-
["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), { "i" }),
-
["<C-d>"] = cmp.mapping.scroll_docs(4),
-
["<C-u>"] = cmp.mapping.scroll_docs(-4),
-
["<C-Space>"] = cmp.mapping.complete(),
-
["<C-e>"] = cmp.mapping.abort(),
-
["<CR>"] = cmp.mapping.confirm({ select = false }),
-
-
["<C-y>"] = cmp.mapping({
-
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }),
-
c = function(fallback)
-
if cmp.visible() then
-
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
-
else
-
fallback()
-
end
-
end,
-
}),
-
-
["<Tab>"] = cmp.mapping(function(fallback)
-
if cmp.visible() then
-
cmp.select_next_item()
-
elseif luasnip.expand_or_jumpable() then
-
luasnip.expand_or_jump()
-
elseif has_words_before() then
-
cmp.complete()
-
else
-
fallback()
-
end
-
end, { "i", "s" }),
-
-
["<S-Tab>"] = cmp.mapping(function(fallback)
-
if cmp.visible() then
-
cmp.select_prev_item()
-
elseif luasnip.jumpable(-1) then
-
luasnip.jump(-1)
-
else
-
fallback()
-
end
-
end, { "i", "s" }),
-
}),
-
})
-44
lua/ptero/configs/gitsigns.lua
···
-
local utils = require("ptero/utils")
-
-
local gitsigns = utils.Load("gitsigns")
-
local icons = require("ptero.icons")
-
local border = require("ptero.borders").style
-
-
gitsigns.setup({
-
signs = {
-
add = { text = icons.git.LineAdded },
-
change = { text = icons.git.LineModified },
-
delete = { text = icons.git.LineRemoved },
-
topdelete = { text = icons.ui.Triangle },
-
changedelete = { text = icons.ui.BoldLineLeft },
-
untracked = { text = icons.git.LineDeleted },
-
},
-
signcolumn = true,
-
numhl = false,
-
linehl = false,
-
word_diff = false,
-
watch_gitdir = {
-
interval = 1000,
-
follow_files = true,
-
},
-
attach_to_untracked = true,
-
current_line_blame = false,
-
current_line_blame_opts = {
-
virt_text = true,
-
virt_text_pos = "eol",
-
delay = 1000,
-
ignore_whitespace = false,
-
},
-
sign_priority = 6,
-
update_debounce = 100,
-
status_formatter = nil,
-
max_file_length = 50000,
-
preview_config = {
-
border = border,
-
style = "minimal",
-
relative = "cursor",
-
row = 0,
-
col = 1,
-
},
-
})
-
-9
lua/ptero/configs/mason.lua
···
-
local utils = require("ptero/utils")
-
local mason = utils.Load("mason")
-
local border = require("ptero.borders").style
-
-
mason.setup({
-
ui = {
-
border = border,
-
},
-
})
-17
lua/ptero/configs/notify.lua
···
-
local utils = require("ptero/utils")
-
local notify = utils.Load("notify")
-
-
local icons = require("ptero.icons")
-
-
notify.setup({
-
render = "compact",
-
icons = {
-
DEBUG = icons.uiv2.Debug,
-
ERROR = icons.uiv2.Error,
-
INFO = icons.uiv2.Info,
-
TRACE = icons.uiv2.Trace,
-
WARN = icons.uiv2.Warn
-
},
-
})
-
-
vim.notify = notify
-5
lua/ptero/configs/starter.lua
···
-
local utils = require("ptero/utils")
-
local starter = utils.Load("mini.starter")
-
-
starter.setup({
-
})
-4
lua/ptero/configs/tabnine.lua
···
-
local utils = require("ptero/utils")
-
local tabnine = utils.Load("cmp_tabnine.config")
-
-
tabnine:setup()
-48
lua/ptero/configs/telescope.lua
···
-
local utils = require("ptero.utils")
-
local telescope = utils.Load("telescope")
-
-
local icons = require("ptero.icons")
-
local border = require("ptero.borders").telescope
-
local actions = require("telescope.actions")
-
-
telescope.setup({
-
defaults = {
-
prompt_prefix = icons.ui.Telescope .. " ",
-
selection_caret = icons.ui.Forward .. " ",
-
borderchars = border,
-
file_ignore_patterns = {
-
"deps",
-
"node_modules",
-
"_build"
-
},
-
mappings = {
-
i = {
-
["<C-j>"] = actions.move_selection_next,
-
["<C-k>"] = actions.move_selection_previous,
-
["<C-c>"] = actions.close,
-
["<C-n>"] = actions.cycle_history_next,
-
["<C-p>"] = actions.cycle_history_prev,
-
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
-
},
-
n = {
-
["<esc>"] = actions.close,
-
["<C-j>"] = actions.move_selection_next,
-
["<C-k>"] = actions.move_selection_previous,
-
},
-
},
-
path_display = {
-
"smart"
-
},
-
set_env = { COLORTERM = "truecolor" },
-
},
-
pickers = {
-
},
-
extensions = {
-
fzf = {
-
fuzzy = true,
-
override_generic_sorter = true,
-
override_file_sorter = true,
-
case_mode = "smart_case",
-
},
-
},
-
})
-18
lua/ptero/configs/treesitter.lua
···
-
local utils = require("ptero/utils")
-
local configs = utils.Load("nvim-treesitter.configs")
-
-
configs.setup {
-
ensure_installed = "all",
-
auto_install = true,
-
highlight = {
-
enable = true,
-
additional_vim_regex_highlighting = false,
-
},
-
indent = {
-
enable = true,
-
disable = {
-
"python"
-
}
-
},
-
}
-
-154
lua/ptero/icons.lua
···
-
return {
-
uiv2 = {
-
Debug = "",
-
Error = "",
-
Info = "",
-
Trace = "✎",
-
Warn = "",
-
},
-
kind = {
-
Text = "t",
-
Method = "m",
-
Function = "f",
-
Constructor = "c",
-
Field = "F",
-
Variable = "v",
-
Class = "c",
-
Interface = "i",
-
Module = "m",
-
Property = "p",
-
Unit = "u",
-
Value = "v",
-
Enum = "e",
-
Keyword = "k",
-
Snippet = "s",
-
Color = "c",
-
File = "f",
-
Reference = "r",
-
Folder = "d",
-
EnumMember = "e",
-
Constant = "c",
-
Struct = "s",
-
Event = "e",
-
Operator = "o",
-
TypeParameter = "t",
-
},
-
git = {
-
LineAdded = "+",
-
LineModified = "~",
-
LineRemoved = "!",
-
FileDeleted = "!",
-
FileIgnored = "◌",
-
FileRenamed = "➜",
-
FileStaged = "S",
-
FileUnmerged = "u",
-
FileUnstaged = "f",
-
FileUntracked = "U",
-
Diff = "d",
-
Repo = "r",
-
Octoface = "",
-
Branch = "",
-
},
-
ui = {
-
ArrowCircleDown = "",
-
ArrowCircleLeft = "",
-
ArrowCircleRight = "",
-
ArrowCircleUp = "",
-
BoldArrowDown = "",
-
BoldArrowLeft = "",
-
BoldArrowRight = "",
-
BoldArrowUp = "",
-
BoldClose = "",
-
BoldDividerLeft = "",
-
BoldDividerRight = "",
-
BoldLineDotted = "┇",
-
BoldLineLeft = "▎",
-
BookMark = "",
-
BoxChecked = "",
-
Bug = "",
-
Stacks = " ",
-
Scopes = "",
-
Watches = "",
-
DebugConsole = " ",
-
Calendar = "",
-
Check = "",
-
ChevronRight = ">",
-
ChevronShortDown = "",
-
ChevronShortLeft = "",
-
ChevronShortRight = "",
-
ChevronShortUp = "",
-
Circle = "",
-
Close = "",
-
CloudDownload = "",
-
Code = "",
-
Comment = "",
-
Dashboard = "",
-
DividerLeft = "",
-
DividerRight = "",
-
DoubleChevronRight = "»",
-
Ellipsis = "…",
-
EmptyFolder = "",
-
EmptyFolderOpen = "",
-
File = "",
-
FileSymlink = "",
-
Files = "",
-
FindFile = "",
-
FindText = "",
-
Fire = "",
-
Folder = "",
-
FolderOpen = "",
-
FolderSymlink = "",
-
Forward = "",
-
Gear = "",
-
History = "",
-
Lightbulb = "",
-
LineDotted = "┆",
-
LineLeft = "▏",
-
LineMiddle = "│",
-
List = "",
-
Lock = "",
-
NewFile = "",
-
Note = "",
-
Package = "",
-
Pencil = "",
-
Plus = "",
-
Project = "",
-
Search = "",
-
SignIn = "",
-
SignOut = "",
-
Tab = "",
-
Table = "",
-
Target = "",
-
Telescope = "🔭",
-
Text = "",
-
Tree = "",
-
Triangle = "契",
-
TriangleShortArrowDown = "",
-
TriangleShortArrowLeft = "",
-
TriangleShortArrowRight = "",
-
TriangleShortArrowUp = "",
-
},
-
diagnostics = {
-
BoldError = "E",
-
Error = "e",
-
BoldWarning = "W",
-
Warning = "W",
-
BoldInformation = "I",
-
Information = "i",
-
BoldQuestion = "?",
-
Question = "?",
-
BoldHint = "H",
-
Hint = "h",
-
Debug = "D",
-
Trace = "t",
-
},
-
misc = {
-
Robot = "ﮧ",
-
Squirrel = "",
-
Tag = "",
-
Watch = "",
-
Smiley = "ﲃ",
-
Package = "",
-
CircuitBoard = "",
-
},
-
}
-4
lua/ptero/keymaps.lua
···
local term_opts = { silent = true}
-
vim.keymap.set("", "<Space>", "<Nop>", opts)
-
vim.g.mapleader = " "
-
vim.g.maplocalleader = " "
-
-- Open netrw in side tree viewer
vim.keymap.set("n", "<leader>e", ":Lex 30<cr>", opts)
+49
lua/ptero/lazy.lua
···
+
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+
if not (vim.uv or vim.loop).fs_stat(lazypath) then
+
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
+
local out = vim.fn.system({
+
"git",
+
"clone",
+
"--filter=blob:none",
+
"--branch=stable",
+
lazyrepo,
+
lazypath
+
})
+
if vim.v.shell_error ~= 0 then
+
vim.api.nvim_echo({
+
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+
{ out, "WarningMsg" },
+
{ "\nPress any key to exit..." },
+
}, true, {})
+
vim.fn.getchar()
+
os.exit(1)
+
end
+
end
+
vim.opt.rtp:prepend(lazypath)
+
+
require "ptero.options"
+
+
require("lazy").setup({
+
spec = {
+
-- colors :3
+
{ import = "ptero.plugins.catppuccin" },
+
{ import = "ptero.plugins.treesitter" },
+
+
-- install lsps easier
+
{ import = "ptero.plugins.mason" },
+
+
-- autocomplete
+
{ import = "ptero.plugins.blink" },
+
+
-- git
+
{ import = "ptero.plugins.gitsigns" },
+
+
-- telescope
+
{ import = "ptero.plugins.telescope" },
+
},
+
+
install = { colorscheme = { "catppuccin-mocha" } },
+
+
-- automatically check for plugin updates
+
checker = { enabled = true },
+
})
-21
lua/ptero/lsp/config.lua
···
-
local icons = require("ptero.icons")
-
local border = require("ptero.borders").style
-
-
vim.diagnostic.config({
-
virtual_text = true,
-
signs = true,
-
underline = true,
-
update_in_insert = false,
-
severity_sort = true,
-
float = {
-
focusable = false,
-
style = "minimal",
-
border = border,
-
source = "always",
-
header = "",
-
prefix = "",
-
},
-
})
-
-
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
-
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
-29
lua/ptero/lsp/handlers.lua
···
-
local M = {}
-
-
-- Helper function to set keymap for specific buffer with a description.
-
local keymap = function(bufnr, mode, lhs, rhs, desc)
-
vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = desc, silent = true })
-
end
-
-
-- capabilities handler
-
local cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
-
if cmp_ok then
-
M.capabilities = cmp_nvim_lsp.default_capabilities()
-
else
-
M.capabilities = vim.lsp.protocol.make_client_capabilities()
-
end
-
-
-- on_attach handler
-
M.on_attach = function(_, bufnr)
-
keymap(bufnr, "n", "K", vim.lsp.buf.hover, "Show Hover")
-
keymap(bufnr, "n", "gd", vim.lsp.buf.definition, "Goto Definition")
-
keymap(bufnr, "n", "gD", vim.lsp.buf.declaration, "Goto Declaration")
-
keymap(bufnr, "n", "gr", vim.lsp.buf.references, "Goto References")
-
keymap(bufnr, "n", "gI", vim.lsp.buf.implementation, "Goto Implementation")
-
keymap(bufnr, "n", "gs", vim.lsp.buf.signature_help, "Show Signature Help")
-
keymap(bufnr, "n", "gl", vim.diagnostic.open_float, "Show Line Diagnostics")
-
keymap(bufnr, "n", "]d", vim.diagnostic.goto_next, "Next Diagnostic")
-
keymap(bufnr, "n", "[d", vim.diagnostic.goto_prev, "Prev Diagnostic")
-
end
-
-
return M
-31
lua/ptero/lsp/init.lua
···
-
require("ptero.lsp.config")
-
-
local utils = require("ptero/utils")
-
local handlers = require("ptero.lsp.handlers")
-
-
local lspconfig = utils.Load("lspconfig")
-
local mason_lspconfig = utils.Load("mason-lspconfig")
-
-
local opts = {
-
on_attach = handlers.on_attach,
-
capabilities = handlers.capabilities,
-
}
-
-
local servers = {
-
'gopls',
-
'tsserver',
-
'pyright',
-
'clangd',
-
'zls',
-
}
-
-
mason_lspconfig.setup({
-
ensure_installed = servers,
-
automatic_installation = true,
-
})
-
-
mason_lspconfig.setup_handlers({
-
function(server_name)
-
lspconfig[server_name].setup(opts)
-
end,
-
})
+10 -4
lua/ptero/options.lua
···
+
-- set leader keys
+
vim.keymap.set("", "<Space>", "<Nop>", opts)
+
vim.g.mapleader = " "
+
vim.g.maplocalleader = " "
+
-- set termguicolors
vim.opt.termguicolors = true
+
-- transparent background
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none" })
···
vim.opt.breakindent = true
-- tab defaults
-
vim.opt.expandtab = false
-
vim.opt.shiftwidth = 4
-
vim.opt.softtabstop = 4
-
vim.opt.tabstop = 4
+
vim.opt.expandtab = true
+
vim.opt.shiftwidth = 2
+
vim.opt.softtabstop = 2
+
vim.opt.tabstop = 2
-- use undofile not swap/backup
vim.opt.undofile = true
-13
lua/ptero/plugins.lua
···
-
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-
if not vim.loop.fs_stat(lazypath) then
-
vim.fn.system({
-
"git",
-
"clone",
-
"--filter=blob:none",
-
"https://github.com/folke/lazy.nvim.git",
-
"--branch=stable", -- latest stable release
-
lazypath,
-
})
-
end
-
vim.opt.rtp:prepend(lazypath)
-
local utils = require("ptero/utils")
require("lazy").setup({
+24
lua/ptero/plugins/blink.lua
···
+
local utils = require("ptero/utils")
+
+
return {
+
{
+
"saghen/blink.cmp",
+
version = '1.*',
+
opts = {
+
keymap = { preset = 'super-tab' },
+
appearance = {
+
nerd_font_variant = 'mono'
+
},
+
completion = { documentation = { auto_show = true } },
+
sources = {
+
default = {
+
'lsp',
+
'path',
+
'buffer',
+
}
+
},
+
fuzzy = { implementation = "prefer_rust" }
+
},
+
opts_extend = { "sources.default" }
+
}
+
}
+29
lua/ptero/plugins/catppuccin.lua
···
+
local utils = require("ptero.utils")
+
+
return {
+
"catppuccin/nvim",
+
name = "catppuccin",
+
priority = 1000,
+
config = function()
+
local catppuccin = utils.Load("catppuccin")
+
if catppuccin then
+
catppuccin.setup({
+
flavour = "mocha",
+
background = {
+
light = "latte",
+
dark = "mocha",
+
},
+
styles = {
+
comments = { "italic" },
+
},
+
transparent_background = true,
+
integrations = {
+
gitsigns = true,
+
treesitter = true,
+
notify = true,
+
blink_cmp = true,
+
},
+
})
+
end
+
end,
+
}
+40
lua/ptero/plugins/gitsigns.lua
···
+
local utils = require("ptero/utils")
+
+
return {
+
{
+
"lewis6991/gitsigns.nvim",
+
config = function()
+
local gitsigns = utils.Load("gitsigns")
+
+
gitsigns.setup({
+
signcolumn = true,
+
numhl = false,
+
linehl = false,
+
word_diff = false,
+
watch_gitdir = {
+
interval = 1000,
+
follow_files = true,
+
},
+
attach_to_untracked = true,
+
current_line_blame = false,
+
current_line_blame_opts = {
+
virt_text = true,
+
virt_text_pos = "eol",
+
delay = 1000,
+
ignore_whitespace = false,
+
},
+
sign_priority = 6,
+
update_debounce = 100,
+
status_formatter = nil,
+
max_file_length = 50000,
+
preview_config = {
+
style = "minimal",
+
border = "single",
+
relative = "cursor",
+
row = 0,
+
col = 1,
+
},
+
})
+
end
+
}
+
}
+21
lua/ptero/plugins/lspconfig.lua
···
+
local utils = require("ptero/utils")
+
+
return {
+
{
+
"neovim/nvim-lspconfig",
+
dependencies = { 'sahgen/blink.cmp' },
+
opts = {
+
servers = {
+
gopls = {}
+
}
+
},
+
config = function()
+
local lspconfig = utils.load("lspconfig")
+
for server, config in pairs(opts.servers) do
+
config.capabilities =
+
require('blink.cmp').get_lsp_capabilities(config.capabilities)
+
lspconfig[server].setup(config)
+
end
+
end
+
}
+
}
+12
lua/ptero/plugins/mason.lua
···
+
local utils = require("ptero/utils")
+
+
return {
+
{
+
"williamboman/mason.nvim",
+
config = function()
+
local mason = utils.Load("mason")
+
mason.setup({
+
})
+
end
+
}
+
}
+55
lua/ptero/plugins/telescope.lua
···
+
local utils = require("ptero.utils")
+
+
local actions = require("telescope.actions")
+
+
return {
+
{
+
"nvim-telescope/telescope.nvim",
+
config = function()
+
local telescope = utils.Load("telescope")
+
+
telescope.setup({
+
defaults = {
+
prompt_prefix = "> ",
+
selection_caret = "> ",
+
borderchars = border,
+
file_ignore_patterns = {
+
"deps",
+
"node_modules",
+
"_build"
+
},
+
mappings = {
+
i = {
+
["<C-j>"] = actions.move_selection_next,
+
["<C-k>"] = actions.move_selection_previous,
+
["<C-c>"] = actions.close,
+
["<C-n>"] = actions.cycle_history_next,
+
["<C-p>"] = actions.cycle_history_prev,
+
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
+
},
+
n = {
+
["<esc>"] = actions.close,
+
["<C-j>"] = actions.move_selection_next,
+
["<C-k>"] = actions.move_selection_previous,
+
},
+
},
+
path_display = {
+
"smart"
+
},
+
set_env = { COLORTERM = "truecolor" },
+
},
+
pickers = {
+
},
+
extensions = {
+
fzf = {
+
fuzzy = true,
+
override_generic_sorter = true,
+
override_file_sorter = true,
+
case_mode = "smart_case",
+
},
+
},
+
})
+
end
+
}
+
}
+
+27
lua/ptero/plugins/treesitter.lua
···
+
local utils = require("ptero/utils")
+
+
return {
+
{
+
"nvim-treesitter/nvim-treesitter",
+
build = ":TSUpdate",
+
event = { "BufReadPost", "BufNewFile" },
+
config = function()
+
local configs = utils.Load("nvim-treesitter.configs")
+
+
configs.setup {
+
ensure_installed = "all",
+
auto_install = true,
+
highlight = {
+
enable = true,
+
additional_vim_regex_highlighting = false,
+
},
+
indent = {
+
enable = true,
+
disable = {
+
"python"
+
}
+
},
+
}
+
end
+
}
+
}
-10
lua/ptero/theme.lua
···
vim.notify("colorscheme " .. colorscheme .. " not found")
return
end
-
-
require(colorscheme).setup({
-
flavour = "mocha",
-
transparent_background = true,
-
integrations = {
-
gitsigns=true,
-
treesitter=true,
-
which_key=true,
-
},
-
})