Compare commits
1 Commits
624fefdd18
...
old
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5190c45daf |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
.session
|
|
||||||
|
|||||||
27
flake.lock
generated
27
flake.lock
generated
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
91
flake.nix
91
flake.nix
@@ -1,91 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Neovim with LSP dev shell";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs =
|
|
||||||
{ self, nixpkgs }:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux"; # change if needed
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
pkgList = with pkgs; [
|
|
||||||
|
|
||||||
# LSPs
|
|
||||||
lua-language-server
|
|
||||||
vscode-langservers-extracted
|
|
||||||
emmet-ls
|
|
||||||
rust-analyzer
|
|
||||||
prettier
|
|
||||||
black
|
|
||||||
nixfmt
|
|
||||||
rustfmt
|
|
||||||
nil
|
|
||||||
python313Packages.python-lsp-server
|
|
||||||
typescript-language-server
|
|
||||||
tailwindcss-language-server
|
|
||||||
stylua
|
|
||||||
nixd
|
|
||||||
|
|
||||||
# other tools
|
|
||||||
lua5_1
|
|
||||||
tree-sitter
|
|
||||||
ripgrep
|
|
||||||
gcc
|
|
||||||
gnumake
|
|
||||||
imagemagick
|
|
||||||
luajitPackages.magick
|
|
||||||
ghostscript
|
|
||||||
luarocks
|
|
||||||
|
|
||||||
(texlive.combine {
|
|
||||||
inherit (texlive)
|
|
||||||
scheme-basic
|
|
||||||
varwidth
|
|
||||||
preview
|
|
||||||
mathtools
|
|
||||||
amsfonts
|
|
||||||
amscdx
|
|
||||||
xcolor
|
|
||||||
dvisvgm
|
|
||||||
dvipng
|
|
||||||
wrapfig
|
|
||||||
standalone
|
|
||||||
graphicxbox
|
|
||||||
amsmath
|
|
||||||
ulem
|
|
||||||
hyperref
|
|
||||||
capt-of
|
|
||||||
;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nvim-wrapped = pkgs.symlinkJoin {
|
|
||||||
name = "nvim-with-lsp";
|
|
||||||
paths = [ pkgs.neovim ];
|
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/nvim \
|
|
||||||
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \
|
|
||||||
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages.${system}.default = nvim-wrapped;
|
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
|
||||||
|
|
||||||
packages = [
|
|
||||||
nvim-wrapped
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
|
||||||
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
|
||||||
echo "Neovim LSP environment loaded"
|
|
||||||
export DEVSHELL_NAME=" flake/#89dceb"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
56
init.lua
56
init.lua
@@ -1,45 +1,49 @@
|
|||||||
require("plugins.init")
|
vim.g.mapleader = "<Space>"
|
||||||
|
|
||||||
|
require("config.lazy")
|
||||||
|
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
-- Colorcheme
|
|
||||||
vim.cmd.colorscheme("catppuccin-mocha")
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
|
||||||
-- Line numbers
|
vim.opt.splitright = true
|
||||||
|
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.wo.relativenumber = true
|
vim.wo.relativenumber = true
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0
|
vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve
|
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve
|
||||||
|
|
||||||
-- Windows
|
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
|
||||||
vim.opt.splitbelow = true
|
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
|
||||||
vim.opt.splitright = true
|
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
|
||||||
vim.o.winborder = "rounded"
|
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
||||||
|
|
||||||
-- Sane tab management
|
vim.keymap.set("n", "<leader>w", "<C-w>")
|
||||||
vim.opt.tabstop = 2
|
vim.keymap.set("n", "<leader>wd", "<cmd>lua Snacks.dashboard()<CR>")
|
||||||
vim.opt.softtabstop = 2
|
vim.keymap.set("n", "<leader>l", "<cmd>bnext<CR>")
|
||||||
vim.opt.shiftwidth = 2
|
vim.keymap.set("n", "<leader>h", "<cmd>bprev<CR>")
|
||||||
vim.opt.expandtab = false
|
vim.keymap.set("n", "<leader>j", "<cmd>lua MiniFiles.open()<CR>")
|
||||||
|
vim.keymap.set("n", "<leader>f", "<cmd>Pick files<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>g", "<cmd>Pick grep_live<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>u", "<cmd>UndotreeToggle<cr><cmd>UndotreeFocus<cr>")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>k", "<cmd>lua Snacks.lazygit()<CR>")
|
||||||
|
vim.keymap.set("n", "<leader>x", "<cmd>FloatermKill<CR>")
|
||||||
|
|
||||||
|
vim.keymap.set("i", "jj", "<Esc>")
|
||||||
|
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
-- Undo management
|
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
|
|
||||||
-- Better Highlighting
|
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = false
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
-- Nowrap
|
require("leap").set_default_mappings()
|
||||||
vim.opt.wrap = false
|
|
||||||
|
|
||||||
-- Scrolloff
|
|
||||||
vim.opt.scrolloff = math.floor(vim.o.lines / 2) - 3
|
|
||||||
|
|
||||||
-- Indent
|
|
||||||
vim.o.autoindent = true
|
|
||||||
|
|
||||||
-- Undotree
|
|
||||||
vim.cmd("packadd nvim.undotree")
|
|
||||||
vim.keymap.set("n", "<leader>u", require("undotree").open)
|
|
||||||
|
|||||||
35
lua/config/lazy.lua
Normal file
35
lua/config/lazy.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
-- 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" },
|
||||||
|
},
|
||||||
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
install = { colorscheme = { "catppuccin-mocha" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
||||||
5
lua/plugins/catppuccin.lua
Normal file
5
lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000, opts = {
|
||||||
|
transparent_background = true,
|
||||||
|
} },
|
||||||
|
}
|
||||||
147
lua/plugins/correction.lua
Normal file
147
lua/plugins/correction.lua
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
return {
|
||||||
|
-- LSP Configuration
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason").setup()
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
ensure_installed = { "ts_ls", "lua_ls", "pyright", "rust_analyzer", "eslint" }, -- Add your desired LSPs
|
||||||
|
automatic_installation = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.lua_ls.setup({})
|
||||||
|
--Enable (broadcasting) snippet capability for completion
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
|
vim.lsp.config("qmlls", {
|
||||||
|
default_config = {
|
||||||
|
cmd = { "qmlls" },
|
||||||
|
filetypes = { "qml" },
|
||||||
|
root_dir = lspconfig.util.root_pattern(".git", "."),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
)
|
||||||
|
vim.lsp.config("cssls", {
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
lspconfig.pyright.setup({})
|
||||||
|
lspconfig.cssls.setup({})
|
||||||
|
lspconfig.qmlls.setup({})
|
||||||
|
lspconfig.ts_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
lspconfig.rust_analyzer.setup({})
|
||||||
|
lspconfig.emmet_ls.setup({
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, -- Add more if needed
|
||||||
|
init_options = {
|
||||||
|
html = {
|
||||||
|
options = {
|
||||||
|
["bem.enabled"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Autocompletion
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"saadparwaiz1/cmp_luasnip", -- Completion for snippets
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
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" }),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Confirm selection with Enter
|
||||||
|
}),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" }, -- This should provide LSP completions like for ESLint
|
||||||
|
-- { name = "luasnip" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Linting
|
||||||
|
{
|
||||||
|
"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" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- autoformatting
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
javascript = { "prettier" },
|
||||||
|
python = { "black" },
|
||||||
|
},
|
||||||
|
format_on_save = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
3
lua/plugins/lightspeed.lua
Normal file
3
lua/plugins/lightspeed.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"ggandor/leap.nvim",
|
||||||
|
}
|
||||||
60
lua/plugins/lualine.lua
Normal file
60
lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
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" },
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { "buffers" },
|
||||||
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||||
|
lualine_y = { "lsp_status" },
|
||||||
|
lualine_z = { "location" },
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
57
lua/plugins/mini.lua
Normal file
57
lua/plugins/mini.lua
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
return {
|
||||||
|
"echasnovski/mini.nvim",
|
||||||
|
version = "*", -- or a specific tag
|
||||||
|
config = function()
|
||||||
|
-- Only load the modules you want
|
||||||
|
require("mini.animate").setup({
|
||||||
|
cursor = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("mini.pairs").setup()
|
||||||
|
require("mini.files").setup()
|
||||||
|
require("mini.cursorword").setup({
|
||||||
|
content = {
|
||||||
|
active = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("mini.notify").setup()
|
||||||
|
require("mini.move").setup({
|
||||||
|
mappings = {
|
||||||
|
down = "J",
|
||||||
|
up = "K",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("mini.surround").setup({
|
||||||
|
mappings = {
|
||||||
|
add = "<leader>sa",
|
||||||
|
delete = "<leader>sd", -- Delete surrounding
|
||||||
|
find = "<leader>sf", -- Find surrounding (to the right)
|
||||||
|
find_left = "<leader>sF", -- Find surrounding (to the left)
|
||||||
|
highlight = "<leader>sh", -- Highlight surrounding
|
||||||
|
replace = "<leader>sr", -- Replace surrounding
|
||||||
|
update_n_lines = "<leader>sn", -- Update `n_lines`
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("mini.ai").setup({
|
||||||
|
mappings = {
|
||||||
|
-- Main textobject prefixes
|
||||||
|
around = "a",
|
||||||
|
inside = "i",
|
||||||
|
|
||||||
|
-- Next/last variants
|
||||||
|
-- NOTE: These override built-in LSP selection mappings on Neovim>=0.12
|
||||||
|
-- Map LSP selection manually to use it (see `:h MiniAi.config`)
|
||||||
|
around_next = "<leader>an",
|
||||||
|
inside_next = "<leader>in",
|
||||||
|
around_last = "<leader>al",
|
||||||
|
inside_last = "<leader>il",
|
||||||
|
|
||||||
|
-- Move cursor to corresponding edge of `a` textobject
|
||||||
|
goto_left = "<leader>g[",
|
||||||
|
goto_right = "<leader>g]",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("mini.pick").setup({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
63
lua/plugins/snacks.lua
Normal file
63
lua/plugins/snacks.lua
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
lazygit = { enabled = true },
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
|
||||||
|
picker = {},
|
||||||
|
dashboard = {
|
||||||
|
enabled = true,
|
||||||
|
width = 100,
|
||||||
|
preset = {
|
||||||
|
keys = {
|
||||||
|
{ icon = " ", key = "f", desc = "Find File", action = ":Pick files" },
|
||||||
|
{ icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
|
||||||
|
{
|
||||||
|
icon = " ",
|
||||||
|
key = "g",
|
||||||
|
desc = "Find Text",
|
||||||
|
action = ":Pick live_grep",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon = " ",
|
||||||
|
key = "r",
|
||||||
|
desc = "Recent Files",
|
||||||
|
action = ":lua Snacks.dashboard.pick('oldfiles')",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon = " ",
|
||||||
|
key = "c",
|
||||||
|
desc = "Config",
|
||||||
|
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})",
|
||||||
|
},
|
||||||
|
{ icon = " ", key = "U", desc = "Restore Session", section = "session" },
|
||||||
|
{
|
||||||
|
icon = " ",
|
||||||
|
key = "L",
|
||||||
|
desc = "Lazy",
|
||||||
|
action = ":Lazy",
|
||||||
|
enabled = package.loaded.lazy ~= nil,
|
||||||
|
},
|
||||||
|
{ icon = " ", key = "q", desc = "Quit", action = ":qa" },
|
||||||
|
},
|
||||||
|
header = [[
|
||||||
|
░ ░░░░ ░░░ ░░░ ░░ ░░░░ ░░░ ░░░░ ░░
|
||||||
|
▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒
|
||||||
|
▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓
|
||||||
|
███ ████ ████ █████ █████ ████ ██ ██ ███ ███ ████ █
|
||||||
|
████ ██████ ███ ██ ███ ████ ██ ████ ███ ██
|
||||||
|
]],
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
{ section = "header" },
|
||||||
|
{ icon = " ", title = "Keymaps", section = "keys", indent = 2, padding = 1 },
|
||||||
|
{ icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1 },
|
||||||
|
{ icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 },
|
||||||
|
{ section = "startup" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
4
lua/plugins/telescope.lua
Normal file
4
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
}
|
||||||
8
lua/plugins/tint.lua
Normal file
8
lua/plugins/tint.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"levouh/tint.nvim",
|
||||||
|
config = function()
|
||||||
|
require("tint").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
13
lua/plugins/toggleterm.lua
Normal file
13
lua/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
version = "*",
|
||||||
|
opts = {--[[ things you want to change go here]]
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("toggleterm").setup({
|
||||||
|
open_mapping = [[<c-\>]],
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
12
lua/plugins/treesitter.lua
Normal file
12
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
run = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
ensure_installed = { "javascript", "lua", "python", "html", "css", "typescript", "rust" }, -- Add JavaScript here
|
||||||
|
highlight = {
|
||||||
|
enable = true, -- Enable syntax highlighting
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
4
lua/plugins/undotree.lua
Normal file
4
lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"mbbill/undotree",
|
||||||
|
lazy = false,
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
require("plugins.ui.catppuccin")
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
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