Compare commits
2 Commits
cfc5baa8ad
...
624fefdd18
| Author | SHA1 | Date | |
|---|---|---|---|
| 624fefdd18 | |||
| 761f890b10 |
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1775423009,
|
||||||
|
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
12
flake.nix
12
flake.nix
@@ -82,15 +82,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
||||||
echo "Neovim LSP environment loaded"
|
echo "Neovim LSP environment loaded"
|
||||||
export DEVSHELL_NAME=" flake/#89dceb"
|
export DEVSHELL_NAME=" flake/#89dceb"
|
||||||
|
|
||||||
# Trigger zsh
|
|
||||||
if [[ -z "$ZSH_VERSION" ]]; then
|
|
||||||
exec zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
2
init.lua
2
init.lua
@@ -1,4 +1,4 @@
|
|||||||
require("config.lazy")
|
require("plugins.init")
|
||||||
|
|
||||||
-- Colorcheme
|
-- Colorcheme
|
||||||
vim.cmd.colorscheme("catppuccin-mocha")
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
-- Autocommand to check git status
|
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
|
||||||
callback = function()
|
|
||||||
-- Verify if the current directory is a git repo
|
|
||||||
local is_git = os.execute("git rev-parse --is-inside-work-tree > /dev/null 2>&1")
|
|
||||||
if is_git ~= 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Perform an async fetch to avoid startup lag
|
|
||||||
vim.fn.jobstart("git fetch", {
|
|
||||||
on_exit = function()
|
|
||||||
-- Get the number of commits the remote is ahead of local HEAD
|
|
||||||
local count = vim.fn.system("git rev-list --count HEAD..@{u} 2>/dev/null"):gsub("%s+", "")
|
|
||||||
|
|
||||||
if count ~= "" and tonumber(count) > 0 then
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.notify(
|
|
||||||
" " .. count .. " new commit(s) available on remote.",
|
|
||||||
vim.log.levels.INFO,
|
|
||||||
{ title = "Git Status", icon = "" }
|
|
||||||
)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {
|
|
||||||
group = cursorline_group,
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.cursorline = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "WinLeave" }, {
|
|
||||||
group = cursorline_group,
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.cursorline = false
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
-- Keymap function
|
|
||||||
function Keymap(mode, key, binding)
|
|
||||||
vim.keymap.set(mode, key, binding, { noremap = true, silent = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
Keymap("n", "q:", ":") -- remove nonsense command
|
|
||||||
Keymap("n", "<leader>bd", function() -- delete buffer
|
|
||||||
vim.cmd("bd")
|
|
||||||
vim.cmd("echo 'Buffer deleted'")
|
|
||||||
end)
|
|
||||||
|
|
||||||
for bind = "i", "a", "A" do -- proper indenting function
|
|
||||||
Keymap("n", bind, function()
|
|
||||||
if vim.fn.getline("."):match("^%s*$") then
|
|
||||||
return [["_cc]]
|
|
||||||
else
|
|
||||||
return bind
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
|
|
||||||
|
|
||||||
-- Open Lazygit
|
|
||||||
Keymap("n", "<leader>l", function()
|
|
||||||
Snacks.lazygit.open()
|
|
||||||
end)
|
|
||||||
|
|
||||||
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
-- Bootstrap lazy.nvim
|
|
||||||
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)
|
|
||||||
|
|
||||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
|
||||||
-- loading lazy.nvim so that mappings are correct.
|
|
||||||
-- This is also a good place to setup other settings (vim.opt)
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = ","
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- import your plugins
|
|
||||||
{ import = "plugins.utils" },
|
|
||||||
{ import = "plugins" },
|
|
||||||
{ import = "plugins.ui" },
|
|
||||||
{ import = "plugins.editing" },
|
|
||||||
{ import = "plugins.completion" },
|
|
||||||
},
|
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
|
||||||
-- colorscheme that will be used when installing plugins.
|
|
||||||
install = { colorscheme = { "catppuccin" } },
|
|
||||||
ui = {
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
-- automatically check for plugin updates
|
|
||||||
checker = { enabled = false },
|
|
||||||
})
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
return {
|
|
||||||
"saghen/blink.cmp",
|
|
||||||
dependencies = {
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
-- Snippet configuration
|
|
||||||
snippets = {
|
|
||||||
preset = "luasnip", -- Tells blink.cmp to use LuaSnip
|
|
||||||
},
|
|
||||||
|
|
||||||
fuzzy = { implementation = "lua" },
|
|
||||||
|
|
||||||
signature = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
completion = {
|
|
||||||
list = {
|
|
||||||
selection = {
|
|
||||||
preselect = false,
|
|
||||||
auto_insert = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Keymaps
|
|
||||||
keymap = {
|
|
||||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
default = {
|
|
||||||
"lazydev",
|
|
||||||
"lsp", -- (Equivalent to cmp-nvim-lsp)
|
|
||||||
"snippets", -- (Handled by the snippets config, replaces cmp_luasnip source)
|
|
||||||
"buffer", -- (Equivalent to cmp-buffer)
|
|
||||||
"path", -- (Equivalent to cmp-path)
|
|
||||||
-- "cmdline", -- Generally configured separately, but often included by default
|
|
||||||
},
|
|
||||||
providers = {
|
|
||||||
lazydev = {
|
|
||||||
name = "LazyDev",
|
|
||||||
module = "lazydev.integrations.blink",
|
|
||||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
|
||||||
score_offset = 100,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
config = function()
|
|
||||||
require("conform").setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
javascript = { "prettier" },
|
|
||||||
python = { "black" },
|
|
||||||
nix = { "nixfmt" },
|
|
||||||
css = { "prettier" },
|
|
||||||
rust = { "rustfmt" },
|
|
||||||
},
|
|
||||||
format_on_save = true,
|
|
||||||
undojoin = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
ft = "lua", -- only load on lua files
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
-- See the configuration section for more details
|
|
||||||
-- Load luvit types when the `vim.uv` word is found
|
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
return {
|
|
||||||
"mfussenegger/nvim-lint",
|
|
||||||
config = function()
|
|
||||||
local lint = require("lint")
|
|
||||||
|
|
||||||
-- Explicitly define linters for each file type (without ast_grep)
|
|
||||||
lint.linters_by_ft = {
|
|
||||||
python = { "flake8" },
|
|
||||||
javascript = { "eslint" },
|
|
||||||
typescript = { "eslint" },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Only show diagnostics close to the cursor
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = {
|
|
||||||
spacing = 4,
|
|
||||||
-- You can make prefix dynamic based on severity using a function
|
|
||||||
prefix = function(diagnostic)
|
|
||||||
local icons = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = " ",
|
|
||||||
[vim.diagnostic.severity.WARN] = " ",
|
|
||||||
[vim.diagnostic.severity.INFO] = " ",
|
|
||||||
[vim.diagnostic.severity.HINT] = " ",
|
|
||||||
}
|
|
||||||
return icons[diagnostic.severity] or "●"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
signs = false,
|
|
||||||
underline = true,
|
|
||||||
update_in_insert = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Auto-run the linter only for the configured filetypes
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
|
||||||
pattern = "!*.lua",
|
|
||||||
callback = function()
|
|
||||||
local ft = vim.bo.filetype
|
|
||||||
if lint.linters_by_ft[ft] then
|
|
||||||
lint.try_lint()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
return {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
vim.lsp.config("lua_ls", {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
-- Tell the server to let Neovim handle snippet expansion
|
|
||||||
completion = {
|
|
||||||
callSnippet = "Replace",
|
|
||||||
},
|
|
||||||
-- Use LuaJIT (which Neovim uses)
|
|
||||||
runtime = {
|
|
||||||
version = "LuaJIT",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.lsp.config("emmet_ls", {
|
|
||||||
-- capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
|
||||||
filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
|
|
||||||
init_options = {
|
|
||||||
html = {
|
|
||||||
options = {
|
|
||||||
["bem.enabled"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.lsp.enable({
|
|
||||||
"lua_ls",
|
|
||||||
"ts_ls",
|
|
||||||
"pylsp",
|
|
||||||
"cssls",
|
|
||||||
"nixd",
|
|
||||||
"rust_analyzer",
|
|
||||||
"emmet_ls",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
lazy = false,
|
|
||||||
branch = "master",
|
|
||||||
build = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
ensure_installed = {
|
|
||||||
"bash",
|
|
||||||
"html",
|
|
||||||
"latex",
|
|
||||||
"javascript",
|
|
||||||
"json",
|
|
||||||
"lua",
|
|
||||||
"norg",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"query",
|
|
||||||
"regex",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"python",
|
|
||||||
"vim",
|
|
||||||
"yaml",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/flash.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
---@type Flash.Config
|
|
||||||
opts = {},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"ss",
|
|
||||||
mode = { "n", "x", "o" },
|
|
||||||
function()
|
|
||||||
require("flash").jump()
|
|
||||||
end,
|
|
||||||
desc = "Flash",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"S",
|
|
||||||
mode = { "n", "x", "o" },
|
|
||||||
function()
|
|
||||||
require("flash").treesitter()
|
|
||||||
end,
|
|
||||||
desc = "Flash Treesitter",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>r",
|
|
||||||
mode = "o",
|
|
||||||
function()
|
|
||||||
require("flash").remote()
|
|
||||||
end,
|
|
||||||
desc = "Remote Flash",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>R",
|
|
||||||
mode = { "o", "x" },
|
|
||||||
function()
|
|
||||||
require("flash").treesitter_search()
|
|
||||||
end,
|
|
||||||
desc = "Treesitter Search",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-neorg/neorg",
|
|
||||||
lazy = true,
|
|
||||||
ft = "norg",
|
|
||||||
version = "*",
|
|
||||||
dependencies = {
|
|
||||||
{ "nvim-lua/plenary.nvim" },
|
|
||||||
{ "nvim-neorg/neorg-telescope" },
|
|
||||||
{ "benlubas/neorg-interim-ls" },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("neorg").setup({
|
|
||||||
load = {
|
|
||||||
["core.defaults"] = {},
|
|
||||||
["core.concealer"] = {},
|
|
||||||
["core.qol.toc"] = {
|
|
||||||
config = {
|
|
||||||
close_after_use = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
["core.integrations.treesitter"] = {},
|
|
||||||
["core.looking-glass"] = {},
|
|
||||||
["core.itero"] = {
|
|
||||||
config = {
|
|
||||||
iterables = {
|
|
||||||
"unordered_list%d",
|
|
||||||
"ordered_list%d",
|
|
||||||
"quote%d",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
["core.completion"] = {
|
|
||||||
config = { engine = { module_name = "external.lsp-completion" } },
|
|
||||||
},
|
|
||||||
["core.dirman"] = {
|
|
||||||
config = {
|
|
||||||
workspaces = {
|
|
||||||
notes = "~/Notes",
|
|
||||||
site = "~/Documents/voidarc/content/",
|
|
||||||
},
|
|
||||||
default_workspace = "notes",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
["core.integrations.telescope"] = {
|
|
||||||
config = {
|
|
||||||
insert_file_link = {
|
|
||||||
-- Whether to show the title preview in telescope. Affects performance with a large
|
|
||||||
-- number of files.
|
|
||||||
show_title_preview = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
["external.interim-ls"] = {
|
|
||||||
config = {
|
|
||||||
-- default config shown
|
|
||||||
completion_provider = {
|
|
||||||
-- Enable or disable the completion provider
|
|
||||||
enable = true,
|
|
||||||
|
|
||||||
-- Show file contents as documentation when you complete a file name
|
|
||||||
documentation = true,
|
|
||||||
|
|
||||||
-- Try to complete categories provided by Neorg Query. Requires `benlubas/neorg-query`
|
|
||||||
categories = false,
|
|
||||||
|
|
||||||
-- suggest heading completions from the given file for `{@x|}` where `|` is your cursor
|
|
||||||
-- and `x` is an alphanumeric character. `{@name}` expands to `[name]{:$/people:# name}`
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.wo.foldlevel = 99
|
|
||||||
vim.wo.conceallevel = 2
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("Filetype", {
|
|
||||||
pattern = "norg",
|
|
||||||
callback = function()
|
|
||||||
vim.keymap.set("n", "<CR>", "<Plug>(neorg.esupports.hop.hop-link.vsplit)", { buffer = true })
|
|
||||||
vim.keymap.set("i", "<CR>", "<Plug>(neorg.itero.next-iteration)", { buffer = true })
|
|
||||||
vim.keymap.set("n", "<localleader>m", "<cmd>Neorg inject-metadata<CR>", { buffer = true })
|
|
||||||
vim.keymap.set("n", "<localleader>f", "<cmd>Telescope neorg insert_link<CR>", { buffer = true })
|
|
||||||
vim.opt.colorcolumn = "140"
|
|
||||||
vim.api.nvim_set_hl(0, "@neorg.tags.ranged_verbatim.code_block", { bg = "NONE" })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/snacks.nvim",
|
|
||||||
config = function()
|
|
||||||
require("snacks").setup({
|
|
||||||
bigfile = {},
|
|
||||||
lazygit = {},
|
|
||||||
image = {
|
|
||||||
enabled = true,
|
|
||||||
math = {
|
|
||||||
enabled = true,
|
|
||||||
latex = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"Aasim-A/scrollEOF.nvim",
|
|
||||||
event = { "CursorMoved", "WinScrolled" },
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
return {}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
opts = {
|
|
||||||
transparent_background = true, -- disables setting the background color.
|
|
||||||
float = {
|
|
||||||
transparent = true, -- enable transparent floating windows
|
|
||||||
solid = false, -- use solid styling for floating windows, see |winborder|
|
|
||||||
},
|
|
||||||
show_end_of_buffer = true, -- shows the '~' characters after the end of buffers
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons", "archibate/lualine-time" },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = "auto",
|
|
||||||
component_separators = { left = "", right = "" },
|
|
||||||
section_separators = { left = "", right = "" },
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {},
|
|
||||||
winbar = {},
|
|
||||||
},
|
|
||||||
ignore_focus = {},
|
|
||||||
always_divide_middle = true,
|
|
||||||
always_show_tabline = true,
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
refresh_time = 16, -- ~60fps
|
|
||||||
events = {
|
|
||||||
"WinEnter",
|
|
||||||
"BufEnter",
|
|
||||||
"BufWritePost",
|
|
||||||
"SessionLoadPost",
|
|
||||||
"FileChangedShellPost",
|
|
||||||
"VimResized",
|
|
||||||
"Filetype",
|
|
||||||
"CursorMoved",
|
|
||||||
"CursorMovedI",
|
|
||||||
"ModeChanged",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
"mode",
|
|
||||||
{
|
|
||||||
function()
|
|
||||||
local reg = vim.fn.reg_recording()
|
|
||||||
if reg == "" then
|
|
||||||
return ""
|
|
||||||
end -- not recording
|
|
||||||
return "MACRO " .. string.upper(tostring(reg))
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_b = { "branch", "diff", "diagnostics" },
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "filetype" },
|
|
||||||
lualine_y = { "lsp_status" },
|
|
||||||
lualine_z = { "ctime" },
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = { "branch", "diff", "diagnostics" },
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { "location" },
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
vim.notify = require("notify").setup({
|
|
||||||
background_colour = "#000000",
|
|
||||||
render = "compact",
|
|
||||||
stages = "slide",
|
|
||||||
})
|
|
||||||
require("noice").setup({
|
|
||||||
messages = {
|
|
||||||
enabled = true,
|
|
||||||
view = "mini",
|
|
||||||
view_error = "notify", -- view for errors
|
|
||||||
view_warn = "notify", -- view for warnings
|
|
||||||
view_history = "messages", -- view for :messages
|
|
||||||
view_search = "virtualtext", -- view for search count messages. Set to `false` to disable
|
|
||||||
},
|
|
||||||
notify = {
|
|
||||||
enabled = true,
|
|
||||||
view = "notify",
|
|
||||||
},
|
|
||||||
hover = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
hover = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
signature = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
"tadaa/vimade",
|
|
||||||
opts = {
|
|
||||||
recipe = { "minimalist", { animate = true } },
|
|
||||||
fadelevel = 0.6,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"okuuva/auto-save.nvim",
|
|
||||||
version = "^1.0.0", -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
|
|
||||||
cmd = "ASToggle", -- optional for lazy loading on command
|
|
||||||
event = { "InsertLeave", "TextChanged" },
|
|
||||||
opts = {},
|
|
||||||
config = function(opts)
|
|
||||||
require("auto-save").setup({
|
|
||||||
enabled = true,
|
|
||||||
trigger_events = { -- See :h events
|
|
||||||
immediate_save = { "BufLeave", "FocusLost", "QuitPre", "VimSuspend" }, -- vim events that trigger an immediate save
|
|
||||||
defer_save = { "InsertLeave" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
|
|
||||||
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
|
|
||||||
},
|
|
||||||
debounce_delay = 1000,
|
|
||||||
noautocmd = true,
|
|
||||||
})
|
|
||||||
local group = vim.api.nvim_create_augroup("autosave", {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "AutoSaveWritePre",
|
|
||||||
group = group,
|
|
||||||
callback = function(opts)
|
|
||||||
if opts.data.saved_buffer ~= nil then
|
|
||||||
local filename = vim.fn.expand("%:t")
|
|
||||||
print("Saved '" .. filename .. "' at " .. vim.fn.strftime("%H:%M:%S"))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "AutoSaveEnable",
|
|
||||||
group = group,
|
|
||||||
callback = function(opts)
|
|
||||||
print("AutoSave enabled")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "AutoSaveDisable",
|
|
||||||
group = group,
|
|
||||||
callback = function(opts)
|
|
||||||
print("AutoSave disabled")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"vladdoster/remember.nvim",
|
|
||||||
config = function()
|
|
||||||
require("remember").setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
return {
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
version = "",
|
|
||||||
|
|
||||||
config = function()
|
|
||||||
require("mini.pairs").setup() -- Bracket pairs and stuff
|
|
||||||
|
|
||||||
require("mini.ai").setup() -- Around and In extension for visual mode
|
|
||||||
|
|
||||||
require("mini.cursorword").setup() -- Underline current word below cursor (makes it easier to c and d)
|
|
||||||
|
|
||||||
require("mini.indentscope").setup({ -- shows indents
|
|
||||||
symbol = "│",
|
|
||||||
draw = {
|
|
||||||
delay = 10,
|
|
||||||
animation = require("mini.indentscope").gen_animation.linear({
|
|
||||||
duration = 15,
|
|
||||||
unit = "step",
|
|
||||||
easing = "out",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("mini.trailspace").setup() -- Shows useless spaces
|
|
||||||
|
|
||||||
require("mini.sessions").setup({ -- dir based session management
|
|
||||||
autoread = true,
|
|
||||||
autowrite = true,
|
|
||||||
file = ".session",
|
|
||||||
force = { read = false, write = true, delete = true },
|
|
||||||
})
|
|
||||||
|
|
||||||
require("mini.surround").setup() -- Suround selections with characters
|
|
||||||
|
|
||||||
require("mini.move").setup({ -- move selection in visual mode
|
|
||||||
mappings = {
|
|
||||||
down = "J",
|
|
||||||
up = "K",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require("mini.icons").setup() -- Icon provider
|
|
||||||
|
|
||||||
-- local animate = require("mini.animate") -- animations ovs
|
|
||||||
-- require("mini.animate").setup({
|
|
||||||
-- cursor = {
|
|
||||||
-- enable = false,
|
|
||||||
-- },
|
|
||||||
-- scroll = {
|
|
||||||
-- -- Animate for 200 milliseconds with linear easing
|
|
||||||
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
|
||||||
-- -- Animate equally but with at most 120 steps instead of default 60
|
|
||||||
-- subscroll = animate.gen_subscroll.equal({ max_output_steps = 60 }),
|
|
||||||
-- },
|
|
||||||
-- open = {
|
|
||||||
-- -- Animate for 400 milliseconds with linear easing
|
|
||||||
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
|
||||||
-- -- Animate with wiping from nearest edge instead of default static one
|
|
||||||
-- winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
|
|
||||||
-- -- Make bigger windows more transparent
|
|
||||||
-- winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
|
|
||||||
-- },
|
|
||||||
-- close = {
|
|
||||||
-- -- Animate for 400 milliseconds with linear easing
|
|
||||||
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
|
|
||||||
-- -- Animate with wiping to nearest edge instead of default static one
|
|
||||||
-- winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
|
|
||||||
-- -- Make bigger windows more transparent
|
|
||||||
-- winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
tag = "",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-telescope/telescope-symbols.nvim",
|
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = { ".git", ".venv", ".node_modules" },
|
|
||||||
},
|
|
||||||
pickers = {
|
|
||||||
live_grep = {
|
|
||||||
additional_args = function(opts)
|
|
||||||
return { "--hidden" }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
file_browser = {
|
|
||||||
theme = "ivy",
|
|
||||||
hijack_netrw = true,
|
|
||||||
},
|
|
||||||
["ui-select"] = {
|
|
||||||
require("telescope.themes").get_dropdown({
|
|
||||||
-- even more opts
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
local builtin = require("telescope.builtin")
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ff", function()
|
|
||||||
builtin.find_files({ hidden = true })
|
|
||||||
end, { desc = "Telescope find files (current file dir)" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fn", function()
|
|
||||||
local full_path = vim.api.nvim_buf_get_name(0)
|
|
||||||
local dir = vim.fn.fnamemodify(full_path, ":h")
|
|
||||||
require("telescope").extensions.file_browser.file_browser({
|
|
||||||
path = dir,
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fs", function() -- select sessions
|
|
||||||
MiniSessions.select()
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fd", function() -- select sessions
|
|
||||||
MiniSessions.select("delete")
|
|
||||||
end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fg", function()
|
|
||||||
builtin.live_grep({ hidden = true })
|
|
||||||
end, { desc = "Telescope live grep (current file dir)" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fb", function()
|
|
||||||
builtin.buffers({ cwd = vim.fn.expand("%:p:h") }) -- buffers don’t need cwd, but harmless
|
|
||||||
end, { desc = "Telescope buffers" })
|
|
||||||
|
|
||||||
require("telescope").load_extension("file_browser")
|
|
||||||
require("telescope").load_extension("ui-select")
|
|
||||||
require("telescope").load_extension("nerdy")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"2kabhishek/nerdy.nvim",
|
|
||||||
cmd = "Nerdy",
|
|
||||||
opts = {
|
|
||||||
max_recents = 30, -- Configure recent icons limit
|
|
||||||
copy_to_clipboard = false, -- Copy glyph to clipboard instead of inserting
|
|
||||||
copy_register = "+", -- Register to use for copying (if `copy_to_clipboard` is true)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
1
plugins/init.lua
Normal file
1
plugins/init.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require("plugins.ui.catppuccin")
|
||||||
10
plugins/ui/catppuccin.lua
Normal file
10
plugins/ui/catppuccin.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
vim.pack.add({ { src = "https://github.com/catppuccin/nvim", name = "catppuccin" } })
|
||||||
|
|
||||||
|
require("catppuccin").setup({
|
||||||
|
transparent_background = true, -- disables setting the background color.
|
||||||
|
float = {
|
||||||
|
transparent = true, -- enable transparent floating windows
|
||||||
|
solid = false, -- use solid styling for floating windows, see |winborder|
|
||||||
|
},
|
||||||
|
show_end_of_buffer = true, -- shows the '~' characters after the end of buffers
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user