mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
touching the nvim.
This commit is contained in:
parent
15e6408670
commit
71717129e1
40 changed files with 1045 additions and 921 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" },
|
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
|
"bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
|
||||||
"catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
|
"catppuccin": { "branch": "main", "commit": "02bdd749931a5d739063562e57531c118e081882" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
|
@ -12,39 +12,42 @@
|
||||||
"dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
|
"dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
|
||||||
"edgy.nvim": { "branch": "main", "commit": "de79b7d92a5979cd71a9a1d8b6282515345e5055" },
|
"edgy.nvim": { "branch": "main", "commit": "de79b7d92a5979cd71a9a1d8b6282515345e5055" },
|
||||||
"fd": { "branch": "master", "commit": "11069e284a61afef8becdd4e189977e5621c0cf9" },
|
"fd": { "branch": "master", "commit": "11069e284a61afef8becdd4e189977e5621c0cf9" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "fa052c20aa7cc62ce6a328c7f3bd556c93b5370e" },
|
"gitsigns.nvim": { "branch": "main", "commit": "c097cb255096f333e14d341082a84f572b394fa2" },
|
||||||
"go.nvim": { "branch": "master", "commit": "ae58327c9e894f6663bf43496063c167170b4ac3" },
|
"go.nvim": { "branch": "master", "commit": "39c245285483f7b587d827b3ff3eaa7e9ed00510" },
|
||||||
"guihua.lua": { "branch": "master", "commit": "3b3126ae87c254f6849e708549ba76c39e3f42f8" },
|
"guihua.lua": { "branch": "master", "commit": "3b3126ae87c254f6849e708549ba76c39e3f42f8" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
||||||
"laravel.nvim": { "branch": "main", "commit": "baafe3c0072ecb7c8f1efc9ed5e3c96ff4fbf056" },
|
"laravel.nvim": { "branch": "main", "commit": "baafe3c0072ecb7c8f1efc9ed5e3c96ff4fbf056" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
||||||
"lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-conform.nvim": { "branch": "main", "commit": "c41b19222db71b016e55c64454b5e03441f56859" },
|
"mason-conform.nvim": { "branch": "main", "commit": "c41b19222db71b016e55c64454b5e03441f56859" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
||||||
"mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" },
|
"mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" },
|
"neo-tree.nvim": { "branch": "main", "commit": "c61074acb19102dfc6f21738dcae4d9a494a8959" },
|
||||||
"neotest": { "branch": "master", "commit": "e07fe8241112274aae9947b98d255763738a1d52" },
|
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||||
|
"neotest": { "branch": "master", "commit": "f03a78cef74db5638e4312e18b767294a90de8da" },
|
||||||
"neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" },
|
"neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" },
|
||||||
"neotest-phpunit": { "branch": "main", "commit": "5799a4ea84450af14461d24edbde43913f9b3008" },
|
"neotest-phpunit": { "branch": "main", "commit": "5799a4ea84450af14461d24edbde43913f9b3008" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
|
"none-ls.nvim": { "branch": "main", "commit": "dca7ddec321a102ec9e792b1b29193702aff5fbb" },
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "0d42ba8d506242b2252d2d2885a7f6f4f5b2bcb2" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" },
|
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
|
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
|
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b3014f2209503944f2714cf27c95591433a0c7d8" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" },
|
"nvim-nio": { "branch": "master", "commit": "5800f585def265d52f1d8848133217c800bcb25d" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "1b050206e490a4146cdf25c7b38969c1711b5620" },
|
"nvim-treesitter": { "branch": "master", "commit": "b0ac1135fe304edd34e18204304906744db0fe63" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "f5183cea0fda26126e22e789382c208e7b1120f4" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "67ac27f859ee3f7584f3edef81d0942bb61d5344" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
|
"nvim-web-devicons": { "branch": "master", "commit": "6e355632387a085f15a66ad68cf681c1d7374a04" },
|
||||||
|
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "4626aaa2bcfdacf55fd6d44b430e2df81b2403ff" },
|
"telescope.nvim": { "branch": "master", "commit": "5a701e99906961218b55d7ad6c2a998f066c6fe0" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
|
||||||
|
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
|
||||||
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
|
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
|
|
||||||
-- Nice command that creates all directores in the path
|
-- Nice command that creates all directores in the path
|
||||||
-- then creates the file and opens it.
|
-- then creates the file and opens it.
|
||||||
vim.api.nvim_create_user_command('CreateFile',
|
local createfile = function(opts)
|
||||||
function(opts)
|
local dir = vim.fs.dirname(opts.fargs[1])
|
||||||
local dir = vim.fs.dirname(opts.fargs[1])
|
vim.cmd(string.format("!mkdir -p %s\n !touch %s", dir, opts.fargs[1]))
|
||||||
vim.cmd(string.format("!mkdir -p %s\n !touch %s", dir, opts.fargs[1]))
|
vim.cmd.e(opts.fargs)
|
||||||
vim.cmd.e(opts.fargs)
|
end
|
||||||
end,
|
|
||||||
{ nargs = 1, complete = "file" }
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('CreateFile', createfile, { nargs = 1, complete = "file" })
|
||||||
vim.cmd("ca cf CreateFile")
|
vim.cmd("ca cf CreateFile")
|
||||||
|
|
|
||||||
|
|
@ -4,32 +4,45 @@
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
|
|
||||||
augroup('indent', { clear = true })
|
|
||||||
|
|
||||||
-- Hardtabs for make
|
-- Add blade filetype for .blade.php files
|
||||||
autocmd('Filetype', {
|
vim.filetype.add({
|
||||||
group = 'indent',
|
pattern = {
|
||||||
pattern = { 'make' },
|
['.*%.blade%.php'] = 'blade',
|
||||||
command = 'setlocal ts=4 sts=0 sw=4 noexpandtab'
|
},
|
||||||
})
|
|
||||||
|
|
||||||
-- Softtab (2) for yaml
|
|
||||||
autocmd('Filetype', {
|
|
||||||
group = 'indent',
|
|
||||||
pattern = { 'yaml' },
|
|
||||||
command = 'setlocal ts=2 sts=2 sw=2 expandtab'
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Hardtabs for c/cpp
|
|
||||||
autocmd('Filetype', {
|
|
||||||
group = 'indent',
|
|
||||||
pattern = { 'c', 'cpp' },
|
|
||||||
command = 'setlocal ts=8 sts=0 sw=8 noexpandtab'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Fix autocomment plugins to use line comments for php.
|
-- Fix autocomment plugins to use line comments for php.
|
||||||
autocmd('Filetype', {
|
autocmd('Filetype', {
|
||||||
pattern = 'php',
|
pattern = 'php',
|
||||||
command = 'setlocal commentstring=//\\%s'
|
command = 'setlocal commentstring=//\\%s'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indent
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
augroup('indent', { clear = true })
|
||||||
|
|
||||||
|
-- Hardtabs for make
|
||||||
|
autocmd('Filetype', {
|
||||||
|
group = 'indent',
|
||||||
|
pattern = { 'make' },
|
||||||
|
command = 'setlocal ts=4 sts=0 sw=4 noexpandtab'
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Softtab (2) for yaml
|
||||||
|
autocmd('Filetype', {
|
||||||
|
group = 'indent',
|
||||||
|
pattern = { 'yaml' },
|
||||||
|
command = 'setlocal ts=2 sts=2 sw=2 expandtab'
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Hardtabs for c/cpp
|
||||||
|
autocmd('Filetype', {
|
||||||
|
group = 'indent',
|
||||||
|
pattern = { 'c', 'cpp' },
|
||||||
|
command = 'setlocal ts=8 sts=0 sw=8 noexpandtab'
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,89 +1,90 @@
|
||||||
return {
|
return {
|
||||||
prompt = '',
|
prompt = '',
|
||||||
current = ' ',
|
current = ' ',
|
||||||
selected = '',
|
selected = '',
|
||||||
close = '',
|
close = '',
|
||||||
pinned = '',
|
modified = '',
|
||||||
tree = {
|
pinned = '',
|
||||||
node = '│',
|
separator = '│',
|
||||||
nodelast = '└',
|
tree = {
|
||||||
},
|
node = '│',
|
||||||
files = {
|
nodelast = '└',
|
||||||
text = "",
|
},
|
||||||
symlink = "",
|
files = {
|
||||||
},
|
text = "",
|
||||||
folder = {
|
symlink = "",
|
||||||
closed = "",
|
},
|
||||||
open = "",
|
folder = {
|
||||||
empty = "",
|
closed = "",
|
||||||
empty_open = "",
|
open = "",
|
||||||
symlink = "",
|
empty = "",
|
||||||
symlink_open = "",
|
empty_open = "",
|
||||||
},
|
symlink = "",
|
||||||
diff = {
|
symlink_open = "",
|
||||||
added = '',
|
},
|
||||||
modified = '',
|
diff = {
|
||||||
removed = '',
|
added = '',
|
||||||
},
|
modified = '',
|
||||||
diff_gutter = {
|
removed = '',
|
||||||
add = '▏',
|
},
|
||||||
change = '▏',
|
diff_gutter = {
|
||||||
delete = '',
|
add = '▍',
|
||||||
untracked = '+'
|
change = '▍',
|
||||||
},
|
delete = '',
|
||||||
gitsigns = {
|
untracked = '+'
|
||||||
-- Change type
|
},
|
||||||
added = "",
|
gitsigns = {
|
||||||
modified = "",
|
-- Change type
|
||||||
deleted = "",
|
added = "",
|
||||||
renamed = "➜",
|
modified = "",
|
||||||
-- Status type
|
deleted = "",
|
||||||
untracked = "★",
|
renamed = "➜",
|
||||||
ignored = "◌",
|
-- Status type
|
||||||
unstaged = "",
|
untracked = "★",
|
||||||
staged = "✓",
|
ignored = "◌",
|
||||||
conflict = "",
|
unstaged = "",
|
||||||
},
|
staged = "✓",
|
||||||
diagnostics = {
|
conflict = "",
|
||||||
error = '',
|
},
|
||||||
warn = '',
|
diagnostics = {
|
||||||
info = '',
|
error = '',
|
||||||
hint = ''
|
warn = '',
|
||||||
},
|
info = '',
|
||||||
test = {
|
hint = ''
|
||||||
ok = '',
|
},
|
||||||
failed = '',
|
test = {
|
||||||
running = '',
|
ok = '',
|
||||||
skipped = '',
|
failed = '',
|
||||||
watch = '',
|
running = '',
|
||||||
unknown = '',
|
skipped = '',
|
||||||
},
|
watch = '',
|
||||||
symbols = {
|
unknown = '',
|
||||||
Text = "",
|
},
|
||||||
Method = "",
|
symbols = {
|
||||||
Function = "",
|
Text = "",
|
||||||
Constructor = "",
|
Method = "",
|
||||||
Field = "",
|
Function = "",
|
||||||
Variable = "",
|
Constructor = "",
|
||||||
Class = "",
|
Field = "",
|
||||||
Interface = "",
|
Variable = "",
|
||||||
Module = "",
|
Class = "",
|
||||||
Property = "",
|
Interface = "",
|
||||||
Unit = "",
|
Module = "",
|
||||||
Value = "",
|
Property = "",
|
||||||
Enum = "",
|
Unit = "",
|
||||||
Keyword = "",
|
Value = "",
|
||||||
Snippet = "",
|
Enum = "",
|
||||||
Color = "",
|
Keyword = "",
|
||||||
File = "",
|
Snippet = "",
|
||||||
Reference = "",
|
Color = "",
|
||||||
Folder = "",
|
File = "",
|
||||||
EnumMember = "",
|
Reference = "",
|
||||||
Constant = "",
|
Folder = "",
|
||||||
Struct = "",
|
EnumMember = "",
|
||||||
Event = "",
|
Constant = "",
|
||||||
Operator = "",
|
Struct = "",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
TypeParameter = "",
|
TypeParameter = "",
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
|
-- config
|
||||||
|
require("config.commands")
|
||||||
require("config.settings")
|
require("config.settings")
|
||||||
require("config.mappings")
|
require("config.mappings")
|
||||||
require("config.filetype")
|
require("config.filetype")
|
||||||
require("config.commands")
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ map("n", "n", "nzzzv", { silent = true, desc = "jump to next search match" })
|
||||||
map("n", "N", "Nzzzv", { silent = true, desc = "jump to previous search match" })
|
map("n", "N", "Nzzzv", { silent = true, desc = "jump to previous search match" })
|
||||||
|
|
||||||
-- Ctrl+s saves the current buffer in normal/insert mode.
|
-- Ctrl+s saves the current buffer in normal/insert mode.
|
||||||
map({"n", "i"}, "<C-s>", cmd.w, { desc = "save current buffer" })
|
map({ "n", "i" }, "<C-s>", cmd.w, { desc = "save current buffer" })
|
||||||
|
|
||||||
-- Move text
|
-- Move text
|
||||||
map("n", "<S-a>", ":m -2<CR>v=", { silent = true, desc = "move current line one line up" })
|
map("n", "<S-a>", ":m -2<CR>v=", { silent = true, desc = "move current line one line up" })
|
||||||
|
|
@ -25,17 +25,21 @@ map("v", "<S-a>", ":m '<-2<CR>gv=gv", { silent = true, desc = "move current sele
|
||||||
map("v", "<S-d>", ":m '>+1<CR>gv=gv", { silent = true, desc = "move current selection one line down" })
|
map("v", "<S-d>", ":m '>+1<CR>gv=gv", { silent = true, desc = "move current selection one line down" })
|
||||||
|
|
||||||
-- copy/paste
|
-- copy/paste
|
||||||
map("x", "<leader>p", [["_dP]], { silent = true, desc = "Paste over selected text without losing content in \"-register" })
|
map("x", "<leader>p", [["_dP]],
|
||||||
map({"n", "v"}, "<leader>y", [["+y]], { desc = "Yank to system clipboard register" })
|
{ silent = true, desc = "Paste over selected text without losing content in \"-register" })
|
||||||
map("n", "<leader>p", [["+p]], { desc = "Paste from system clipboard register" })
|
map({ "n", "v" }, "<leader>y", [["+y]], { desc = "Yank to system clipboard register" })
|
||||||
|
map({ "n", "v" }, "<leader>p", [["+p]], { desc = "Paste from system clipboard register" })
|
||||||
|
|
||||||
-- File operations
|
-- File operations
|
||||||
map("n", "<leader>fx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Set execute flag on current file" })
|
map("n", "<leader>Fc", ":CreateFile ", { silent = true, desc = "Create new file" })
|
||||||
|
map("n", "<leader>Fx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Set execute flag on current file" })
|
||||||
|
|
||||||
-- buffers
|
-- buffers
|
||||||
map("n", "<leader>bn", cmd.bn, { silent = true, desc = "Move to next buffer"})
|
map("n", "<leader>bn", cmd.bn, { silent = true, desc = "Move to next buffer" })
|
||||||
map("n", "<leader>bb", cmd.bp, { silent = true, desc = "Move to previous buffer"})
|
map("n", "<leader>bb", cmd.bp, { silent = true, desc = "Move to previous buffer" })
|
||||||
map("n", "<leader>bd", cmd.bd, { silent = true, desc = "Close current buffer"})
|
map("n", "<leader>bd", cmd.bd, { silent = true, desc = "Close current buffer" })
|
||||||
|
map("n", "<leader>bc", "<cmd>BufferLineCloseOthers<cr>", { silent = true, desc = "Close all other buffers" })
|
||||||
|
map("n", "<leader>bD", "<cmd>%bd<cr>", { silent = true, desc = "Close all buffers" })
|
||||||
|
|
||||||
-- Indent
|
-- Indent
|
||||||
map('n', "<Tab>", "^=$")
|
map('n', "<Tab>", "^=$")
|
||||||
|
|
@ -43,21 +47,25 @@ map('x', "<Tab>", "=", { desc = "auto indent selection" })
|
||||||
map("i", "<S-Tab>", "<C-d>", { desc = "delete indent" })
|
map("i", "<S-Tab>", "<C-d>", { desc = "delete indent" })
|
||||||
|
|
||||||
-- fix paste
|
-- fix paste
|
||||||
map('n', "p", "p=$")
|
-- map('n', "p", "p=$")
|
||||||
|
|
||||||
-- Crazy search+replace
|
-- Crazy search+replace
|
||||||
map("n", "<leader>rw", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {
|
map("n", "<leader>rw", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {
|
||||||
desc = "search+replace word under cursor"
|
desc = "search+replace word under cursor"
|
||||||
})
|
})
|
||||||
|
|
||||||
map({"x"}, "<leader>hx", [[:s/\(\x\{2\}\)/0x\1,/g<cr>]], { desc = "Format hex"})
|
map({ "x" }, "<leader>fhx", [[:s/\(\x\{2\}\)/0x\1, /g]], { desc = "Format hex" })
|
||||||
map({"x"}, "<leader>ha", [[:s/0x\(\x\{1\}\X\)/0x0\1/g<cr>]], { desc = "Format hex more"})
|
map({ "x" }, "<leader>fha", [[:s/0x\(\x\{1\}\X\)/0x0\1/g]], { desc = "Format each hex number to be 2 characters long" })
|
||||||
map({"x"}, "<leader>hn", [[:s/\(\(0x\x\{1,2\}, \)\{8\}\)/\1\r/g<cr>]], { desc = "Format hex with 8 bytes per row"})
|
map({ "x" }, "<leader>fhn", [[:s/\(\(0x\x\{1,2\}, \)\{8\}\)/\1\r/g]], { desc = "Format hex with 8 bytes per row" })
|
||||||
|
-- map({"x"}, "<leader>hb", [[:'<,'>s/\(\x\{2\}\)/0x\1, /g<cr>]], { desc = "Format a hex string to byte array"})
|
||||||
|
|
||||||
|
-- diagnostics
|
||||||
|
map("n", "<leader>do", vim.diagnostic.open_float, { desc = "Open diagnostics" })
|
||||||
|
map("n", "<leader>dn", vim.diagnostic.get_next, { desc = "Goto next" })
|
||||||
|
map("n", "<leader>dp", vim.diagnostic.get_prev, { desc = "Goto previous" })
|
||||||
|
|
||||||
|
-- TMux
|
||||||
|
map("n", "<leader>m", ":terminal tmuxs<cr>i", { desc = "Open tmux manager" })
|
||||||
|
|
||||||
|
|
||||||
map("n", "Q", "<nop>")
|
map("n", "Q", "<nop>")
|
||||||
|
|
||||||
-- diagnostics
|
|
||||||
map("n", "<leader>do", vim.diagnostic.open_float, { desc = "Open diagnostics"})
|
|
||||||
map("n", "<leader>dn", vim.diagnostic.get_next, { desc = "Goto next"})
|
|
||||||
map("n", "<leader>dp", vim.diagnostic.get_prev, { desc = "Goto previous"})
|
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,46 @@
|
||||||
local icons = require('config.icons')
|
local icons = require('config.icons')
|
||||||
|
|
||||||
return function ()
|
return function()
|
||||||
local highlightfunc = require("catppuccin.groups.integrations.bufferline")
|
local highlightfunc = require("catppuccin.groups.integrations.bufferline")
|
||||||
return {
|
return {
|
||||||
highlights = highlightfunc.get(),
|
highlights = highlightfunc.get(),
|
||||||
options = {
|
options = {
|
||||||
mode = "buffers",
|
mode = "buffers",
|
||||||
themable = true,
|
themable = true,
|
||||||
buffer_close_icon = icons.close,
|
buffer_close_icon = icons.close,
|
||||||
close_icon = icons.close,
|
close_icon = icons.close,
|
||||||
modified_icon = icons.modified_icon,
|
modified_icon = icons.modified,
|
||||||
diagnostics = false,
|
diagnostics = false,
|
||||||
enforce_regular_tabs = true,
|
enforce_regular_tabs = true,
|
||||||
indicator = {
|
indicator = {
|
||||||
style = 'underline',
|
icon = "",
|
||||||
},
|
},
|
||||||
close_command = function (bufnum)
|
close_command = function(bufnum)
|
||||||
vim.cmd("bprev")
|
vim.cmd("bprev")
|
||||||
vim.api.nvim_buf_delete(bufnum, {})
|
vim.api.nvim_buf_delete(bufnum, {})
|
||||||
end,
|
end,
|
||||||
hover = {
|
hover = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
delay = 200,
|
delay = 200,
|
||||||
reveal = {'close'}
|
reveal = { 'close' }
|
||||||
},
|
},
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "neo-tree",
|
filetype = "neo-tree",
|
||||||
text = "File Explorer",
|
text = "File Explorer",
|
||||||
text_align = "left"
|
text_align = "left"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
custom_areas = {
|
||||||
}
|
left = function()
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
text = " ",
|
||||||
|
fg = "#8fff6d",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
flavour = "mocha",
|
flavour = "mocha",
|
||||||
color_overrides = {
|
color_overrides = {
|
||||||
mocha = {
|
mocha = {
|
||||||
base = '#0e1019',
|
base = '#0E1019',
|
||||||
mantle = '#0D0F17',
|
mantle = '#0D0F17',
|
||||||
crust = '#0C0D14',
|
crust = '#0C0D14',
|
||||||
surface0 = '#131521',
|
surface0 = '#131521',
|
||||||
|
|
@ -19,13 +19,17 @@ return {
|
||||||
highlight_overrides = {
|
highlight_overrides = {
|
||||||
mocha = function(colors)
|
mocha = function(colors)
|
||||||
return {
|
return {
|
||||||
|
-- Normal = { fg = colors.text },
|
||||||
|
-- NormalNC = { fg = colors.text },
|
||||||
|
|
||||||
-- Floating windows
|
-- Floating windows
|
||||||
NormalFloat = { fg = colors.text, bg = colors.base },
|
NormalFloat = { fg = colors.text, bg = colors.mantle },
|
||||||
FloatTitle = { fg = colors.base, bg = colors.blue },
|
FloatTitle = { fg = colors.base, bg = colors.blue },
|
||||||
FloatBorder = { fg = colors.blue, bg = colors.base },
|
FloatBorder = { fg = colors.blue, bg = colors.mantle },
|
||||||
|
|
||||||
-- Window separator
|
-- Window separator
|
||||||
WinSeparator = { fg = colors.surface0 },
|
WinSeparator = { fg = colors.surface0 },
|
||||||
|
NeoTreeWinSeparator = { link = "WinSeparator" },
|
||||||
|
|
||||||
-- Menus
|
-- Menus
|
||||||
Pmenu = { fg = colors.text, bg = colors.mantle },
|
Pmenu = { fg = colors.text, bg = colors.mantle },
|
||||||
|
|
@ -49,6 +53,16 @@ return {
|
||||||
TelescopePromptBorder = { fg = colors.mantle, bg = colors.mantle },
|
TelescopePromptBorder = { fg = colors.mantle, bg = colors.mantle },
|
||||||
TelescopePromptTitle = { fg = colors.crust, bg = colors.blue },
|
TelescopePromptTitle = { fg = colors.crust, bg = colors.blue },
|
||||||
TelescopePreviewTitle = { fg = colors.crust, bg = colors.mauve },
|
TelescopePreviewTitle = { fg = colors.crust, bg = colors.mauve },
|
||||||
|
TelescopeSelection = { fg = colors.text, bg = colors.surface0 },
|
||||||
|
|
||||||
|
-- Statusline
|
||||||
|
StatusLine = { fg = colors.text, bg = colors.mantle },
|
||||||
|
StatusLineNormal = { fg = colors.text, bg = colors.mantle },
|
||||||
|
StatusLineSeparator = { fg = colors.surface0, bg = colors.mantle },
|
||||||
|
StatusLineInsert = { fg = colors.base, bg = colors.blue },
|
||||||
|
StatusLineVisual = { fg = colors.base, bg = colors.mauve },
|
||||||
|
StatusLineCommand = { fg = colors.base, bg = colors.yellow },
|
||||||
|
StatusLineReplace = { fg = colors.base, bg = colors.maroon },
|
||||||
|
|
||||||
-- Syntax
|
-- Syntax
|
||||||
PreProc = { link = "Include" },
|
PreProc = { link = "Include" },
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,59 @@
|
||||||
local icons = require('config.icons')
|
return function()
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local lspkind = require('utils.lspkind')
|
||||||
|
local icons = require('config.icons')
|
||||||
|
|
||||||
return function ()
|
local selectPrev = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
|
||||||
local lspkind_config = {
|
local selectNext = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert })
|
||||||
mode = 'symbol',
|
|
||||||
preset = 'codicons',
|
|
||||||
symbol_map = icons.symbols,
|
|
||||||
maxwidth = 40,
|
|
||||||
ellipsis_char = "...",
|
|
||||||
}
|
|
||||||
local cmp = require('cmp')
|
|
||||||
|
|
||||||
local selectPrev = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
|
local borderstyle = {
|
||||||
local selectNext = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert })
|
border = "none",
|
||||||
|
winhighlight = 'Normal:Pmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None',
|
||||||
|
}
|
||||||
|
|
||||||
local borderstyle = {
|
return {
|
||||||
border = "none",
|
preselect = false,
|
||||||
winhighlight = 'Normal:Pmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None',
|
view = {
|
||||||
}
|
entries = { name = 'custom', selection_order = 'near_cursor' },
|
||||||
|
},
|
||||||
return {
|
window = {
|
||||||
completion = {
|
documentation = borderstyle,
|
||||||
completeopt = "menu,menuone,noinsert",
|
completion = borderstyle
|
||||||
},
|
},
|
||||||
-- enabled = function()
|
mapping = {
|
||||||
-- if require"cmp.config.context".in_treesitter_capture("comment")==true or require"cmp.config.context".in_syntax_group("Comment") then
|
["<Up>"] = selectPrev,
|
||||||
-- return false
|
["<S-Tab>"] = selectPrev,
|
||||||
-- else
|
["<Down>"] = selectNext,
|
||||||
-- return true
|
["<Tab>"] = selectNext,
|
||||||
-- end
|
["<S-c>"] = cmp.mapping.abort(),
|
||||||
-- end,
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
-- preselect = false,
|
},
|
||||||
view = {
|
snippet = {
|
||||||
entries = { name = 'custom', selection_order = 'near_cursor' },
|
expand = function(args)
|
||||||
},
|
require('luasnip').lsp_expand(args.body)
|
||||||
window = {
|
end,
|
||||||
documentation = borderstyle,
|
},
|
||||||
completion = borderstyle
|
formatting = {
|
||||||
},
|
fields = { "abbr", "kind", "menu" },
|
||||||
mapping = {
|
format = lspkind.format({
|
||||||
["<Up>"] = selectPrev,
|
mode = 'symbol',
|
||||||
["<S-Tab>"] = selectPrev,
|
preset = 'codicons',
|
||||||
["<Down>"] = selectNext,
|
symbol_map = icons.symbols,
|
||||||
["<Tab>"] = selectNext,
|
maxwidth = 40,
|
||||||
["<esc>"] = cmp.mapping.abort(),
|
ellipsis_char = "...",
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
}),
|
||||||
},
|
},
|
||||||
snippet = {
|
sources = {
|
||||||
expand = function(args)
|
{ name = "copilot" },
|
||||||
require('luasnip').lsp_expand(args.body)
|
{ name = 'nvim_lsp' },
|
||||||
end,
|
{ name = 'buffer' },
|
||||||
},
|
{ name = 'path' },
|
||||||
formatting = {
|
{ name = 'luasnip' }
|
||||||
fields = { "abbr", "kind", "menu" },
|
},
|
||||||
format = function(entry, vim_item)
|
experimental = {
|
||||||
if vim.tbl_contains({ 'path' }, entry.source.name) then
|
ghost_text = {
|
||||||
local icon, hl_group = require('nvim-web-devicons').get_icon(entry:get_completion_item().label)
|
hl_group = "NonText",
|
||||||
if icon then
|
},
|
||||||
vim_item.kind = icon
|
},
|
||||||
vim_item.kind_hl_group = hl_group
|
}
|
||||||
return vim_item
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return require('lspkind').cmp_format(lspkind_config)(entry, vim_item)
|
|
||||||
end
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "copilot" },
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'buffer' },
|
|
||||||
{ name = 'path' },
|
|
||||||
{ name = 'luasnip' }
|
|
||||||
},
|
|
||||||
experimental = {
|
|
||||||
ghost_text = {
|
|
||||||
hl_group = "NonText",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ return {
|
||||||
-- Toggle comment on visual selection
|
-- Toggle comment on visual selection
|
||||||
comment_visual = '<leader>/',
|
comment_visual = '<leader>/',
|
||||||
|
|
||||||
-- Define 'comment' textobject (like `dgc` - delete whole comment block)
|
-- Define 'comment' textobject (like `dg/` - delete whole comment block)
|
||||||
-- Works also in Visual mode if mapping differs from `comment_visual`
|
-- Works also in Visual mode if mapping differs from `comment_visual`
|
||||||
textobject = 'gc',
|
textobject = 'g/',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
return {
|
return {
|
||||||
keys = {
|
keys = {
|
||||||
["<leader>la"] = { ":Laravel artisan<cr>", "Run artisan" },
|
["<leader>la"] = { "<cmd>Laravel artisan<cr>", "Run artisan" },
|
||||||
["<leader>lr"] = { ":Laravel routes<cr>", "Search routes" },
|
["<leader>lm"] = { "<cmd>Laravel make<cr>", "Make" },
|
||||||
["<leader>lm"] = { ":Laravel related<cr>", "Related" },
|
["<leader>lr"] = { "<cmd>Laravel routes<cr>", "Search routes" },
|
||||||
|
["<leader>lR"] = { "<cmd>Laravel related<cr>", "Related" },
|
||||||
|
["<leader>lv"] = { "<cmd>Laravel view-finder<cr>", "View finder" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,74 @@
|
||||||
return {
|
return {
|
||||||
mappings = {
|
mappings = {
|
||||||
["<leader>rs"] = { vim.lsp.buf.rename, { desc = "Rename symbol" }},
|
["<leader>rs"] = { vim.lsp.buf.rename, { desc = "Rename symbol" } },
|
||||||
["<leader>ca"] = { vim.lsp.buf.code_action, { desc = "Code action" }},
|
["<leader>ca"] = { vim.lsp.buf.code_action, { desc = "Code action" } },
|
||||||
["<leader>ff"] = { vim.lsp.buf.format, { desc = "Format file" }},
|
["<leader>ff"] = { vim.lsp.buf.format, { desc = "Format file" } },
|
||||||
gd = { vim.lsp.buf.definition, { desc = "Goto definition" }},
|
K = { vim.lsp.buf.hover, { desc = "Hover" } },
|
||||||
gi = { vim.lsp.buf.implementation, { desc = "Goto implementation"}},
|
gd = { vim.lsp.buf.definition, { desc = "Goto definition" } },
|
||||||
gr = { vim.lsp.buf.references, { desc = "Goto references"}},
|
gi = { vim.lsp.buf.implementation, { desc = "Goto implementation" } },
|
||||||
},
|
gr = { vim.lsp.buf.references, { desc = "Goto references" } },
|
||||||
servers = {
|
},
|
||||||
-- PHP
|
servers = {
|
||||||
phpactor = {
|
-- PHP
|
||||||
settings = {
|
-- phpactor = {
|
||||||
init_options = {
|
-- settings = {
|
||||||
["language_server_phpstan.enabled"] = true,
|
-- init_options = {
|
||||||
["language_server_psalm.enabled"] = false,
|
-- ["language_server_phpstan.enabled"] = true,
|
||||||
}
|
-- ["language_server_psalm.enabled"] = false,
|
||||||
}
|
-- }
|
||||||
},
|
-- }
|
||||||
-- GO
|
-- },
|
||||||
gopls = {
|
--
|
||||||
-- format_on_save = true,
|
--
|
||||||
on_save = function ()
|
-- JS,TS,VUE
|
||||||
local params = vim.lsp.util.make_range_params()
|
volar = {
|
||||||
params.context = {only = {"source.organizeImports"}}
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json' }
|
||||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 1000)
|
},
|
||||||
for cid, res in pairs(result or {}) do
|
-- TailwindCSS
|
||||||
for _, r in pairs(res.result or {}) do
|
tailwindcss = {},
|
||||||
if r.edit then
|
-- GO
|
||||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
gopls = {
|
||||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
-- format_on_save = true,
|
||||||
end
|
on_save = function()
|
||||||
end
|
local params = vim.lsp.util.make_range_params()
|
||||||
end
|
params.context = { only = { "source.organizeImports" } }
|
||||||
vim.lsp.buf.format({async = false})
|
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 1000)
|
||||||
end,
|
for cid, res in pairs(result or {}) do
|
||||||
settings = {
|
for _, r in pairs(res.result or {}) do
|
||||||
gopls = {
|
if r.edit then
|
||||||
analyses = {
|
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||||
unusedvariable = true,
|
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||||
unusedwrite = true,
|
end
|
||||||
useany = true
|
end
|
||||||
},
|
end
|
||||||
gofumpt = true,
|
vim.lsp.buf.format({ async = false })
|
||||||
},
|
end,
|
||||||
},
|
settings = {
|
||||||
},
|
gopls = {
|
||||||
-- Lua
|
analyses = {
|
||||||
lua_ls = {
|
unusedvariable = true,
|
||||||
settings = {
|
unusedwrite = true,
|
||||||
Lua = {
|
useany = true
|
||||||
runtime = {
|
},
|
||||||
version = 'LuaJIT'
|
gofumpt = true,
|
||||||
},
|
},
|
||||||
workspace = {
|
},
|
||||||
checkThirdParty = false,
|
},
|
||||||
library = {
|
-- Lua
|
||||||
vim.env.VIMRUNTIME
|
lua_ls = {
|
||||||
}
|
settings = {
|
||||||
}
|
Lua = {
|
||||||
},
|
runtime = {
|
||||||
},
|
version = 'LuaJIT'
|
||||||
},
|
},
|
||||||
},
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
93
nvim/lua/config/plugins/lualine.lua
Normal file
93
nvim/lua/config/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
local icons = require('config.icons')
|
||||||
|
local separator = { "'" .. icons.separator .. "'", color = 'StatusLineSeparator' }
|
||||||
|
|
||||||
|
return {
|
||||||
|
options = {
|
||||||
|
globalstatus = true,
|
||||||
|
component_separators = '',
|
||||||
|
section_separators = '',
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {
|
||||||
|
'dashboard',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme = {
|
||||||
|
normal = {
|
||||||
|
a = "StatusLineNormal",
|
||||||
|
b = "StatusLine",
|
||||||
|
c = "StatusLine",
|
||||||
|
x = "StatusLine",
|
||||||
|
y = "StatusLine",
|
||||||
|
z = "StatusLine",
|
||||||
|
},
|
||||||
|
command = {
|
||||||
|
a = "StatusLineCommand",
|
||||||
|
z = "StatusLine",
|
||||||
|
},
|
||||||
|
insert = {
|
||||||
|
a = "StatusLineInsert",
|
||||||
|
z = "StatusLine",
|
||||||
|
},
|
||||||
|
visual = {
|
||||||
|
a = "StatusLineVisual",
|
||||||
|
z = "StatusLine",
|
||||||
|
},
|
||||||
|
replace = {
|
||||||
|
a = "StatusLineReplace",
|
||||||
|
z = "StatusLine",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {
|
||||||
|
"mode",
|
||||||
|
},
|
||||||
|
lualine_b = {
|
||||||
|
separator,
|
||||||
|
"branch",
|
||||||
|
separator,
|
||||||
|
'" " .. tostring(#vim.tbl_keys(vim.lsp.buf_get_clients()))',
|
||||||
|
{
|
||||||
|
require("lazy.status").updates,
|
||||||
|
cond = require("lazy.status").has_updates,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diagnostics",
|
||||||
|
symbols = {
|
||||||
|
error = icons.diagnostics.error .. ' ',
|
||||||
|
warn = icons.diagnostics.warn .. ' ',
|
||||||
|
info = icons.diagnostics.info .. ' ',
|
||||||
|
hint = icons.diagnostics.hint .. ' ',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"diff",
|
||||||
|
symbols = {
|
||||||
|
added = icons.diff.added .. ' ',
|
||||||
|
modified = icons.diff.modified .. ' ',
|
||||||
|
removed = icons.diff.removed .. ' '
|
||||||
|
}
|
||||||
|
},
|
||||||
|
separator,
|
||||||
|
},
|
||||||
|
lualine_c = {
|
||||||
|
'filename'
|
||||||
|
},
|
||||||
|
lualine_x = {
|
||||||
|
'filetype',
|
||||||
|
'fileformat',
|
||||||
|
'(vim.bo.expandtab and "SPC" or "TAB") .. " " .. vim.bo.shiftwidth',
|
||||||
|
},
|
||||||
|
lualine_y = {
|
||||||
|
separator,
|
||||||
|
'location',
|
||||||
|
'progress'
|
||||||
|
},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
'lazy',
|
||||||
|
'neo-tree'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,10 +10,15 @@ return {
|
||||||
{ '<leader>sg', '<cmd>Telescope git_files<cr>', desc = 'Search Git files' },
|
{ '<leader>sg', '<cmd>Telescope git_files<cr>', desc = 'Search Git files' },
|
||||||
{ '<leader>so', '<cmd>Telescope oldfiles<cr>', desc = 'Search Old files' },
|
{ '<leader>so', '<cmd>Telescope oldfiles<cr>', desc = 'Search Old files' },
|
||||||
{ '<leader>sw', '<cmd>Telescope grep_string<cr>', desc = 'Search for word under cursor' },
|
{ '<leader>sw', '<cmd>Telescope grep_string<cr>', desc = 'Search for word under cursor' },
|
||||||
|
{ '<leader>sd', '<cmd>Telescope diagnostics<cr>', desc = 'Search Diagnostics' },
|
||||||
|
{ '<leader>sq', '<cmd>Telescope quickfix<cr>', desc = 'Search Quickfix' },
|
||||||
|
{ '<leader>sh', '<cmd>Telescope help<cr>', desc = 'Search Neovim help' },
|
||||||
-- LSP
|
-- LSP
|
||||||
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
|
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
|
||||||
{ '<leader>ss', '<cmd>Telescope lsp_document_symbols<cr>', desc = 'Search document symbols' },
|
{ '<leader>ss', '<cmd>Telescope lsp_document_symbols<cr>', desc = 'Search document symbols' },
|
||||||
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
|
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
|
||||||
|
{ '<leader>si', '<cmd>Telescope lsp_implementations<cr>', desc = 'Search Inplementations' },
|
||||||
|
{ '<leader>sp', '<cmd>Telescope lsp_workspace_symbols<cr>', desc = 'Search Workspace symbols' },
|
||||||
{ 'gd', '<cmd>Telescope lsp_definitions<cr>', desc = 'Goto definition' },
|
{ 'gd', '<cmd>Telescope lsp_definitions<cr>', desc = 'Goto definition' },
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
|
|
|
||||||
10
nvim/lua/config/plugins/trouble.lua
Normal file
10
nvim/lua/config/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
keys = {
|
||||||
|
{ "<leader>xx", function() require("trouble").toggle() end },
|
||||||
|
{ "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end },
|
||||||
|
{ "<leader>xd", function() require("trouble").toggle("document_diagnostics") end },
|
||||||
|
{ "<leader>xq", function() require("trouble").toggle("quickfix") end },
|
||||||
|
{ "<leader>xl", function() require("trouble").toggle("loclist") end },
|
||||||
|
{ "gR", function() require("trouble").toggle("lsp_references") end },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,8 @@ return {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
["<leader>r"] = { name = "+rename" },
|
["<leader>r"] = { name = "+rename" },
|
||||||
["<leader>b"] = { name = "+buffers" },
|
["<leader>b"] = { name = "+buffers" },
|
||||||
["<leader>f"] = { name = "+files" },
|
["<leader>f"] = { name = "+format" },
|
||||||
|
["<leader>F"] = { name = "+files" },
|
||||||
["<leader>d"] = { name = "+diagnostics" }
|
["<leader>d"] = { name = "+diagnostics" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,34 @@
|
||||||
local set = vim.opt
|
local set = vim.opt
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
-- General Settings
|
-- General Settings
|
||||||
--
|
--
|
||||||
|
|
||||||
set.termguicolors = true
|
set.termguicolors = true
|
||||||
set.updatetime = 50
|
set.updatetime = 50
|
||||||
set.showmode = false -- disable mode in the command line, because i use lualine
|
set.showmode = false -- disable mode in the command line, because i use lualine
|
||||||
set.mousemoveevent = true
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Editor settings
|
-- Editor settings
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
set.pumheight = 20
|
set.pumheight = 20
|
||||||
set.hlsearch = false
|
|
||||||
set.incsearch = true
|
|
||||||
set.laststatus = 3
|
set.laststatus = 3
|
||||||
set.splitkeep = "screen"
|
set.splitkeep = "screen"
|
||||||
set.scrolloff=20
|
set.scrolloff = 20
|
||||||
--vim.opt.sidescrolloff = 8
|
|
||||||
|
-- mouse and cursor
|
||||||
set.cursorline = true
|
set.cursorline = true
|
||||||
|
set.mousemoveevent = true
|
||||||
|
|
||||||
|
-- search
|
||||||
|
set.hlsearch = false
|
||||||
|
set.incsearch = true
|
||||||
|
set.ignorecase = true
|
||||||
|
set.smartcase = true
|
||||||
|
|
||||||
-- line numbers
|
-- line numbers
|
||||||
set.number = true
|
set.number = true
|
||||||
|
|
@ -26,28 +36,40 @@ set.relativenumber = true
|
||||||
set.numberwidth = 5
|
set.numberwidth = 5
|
||||||
|
|
||||||
-- sign column to the right.
|
-- sign column to the right.
|
||||||
--set.statuscolumn = '%=%{v:relnum?v:relnum:v:lnum} %s '
|
--set.statuscolumn = '%=%{v:relnum?v:relnum:v:lnum} %s '
|
||||||
|
|
||||||
-- sign column to the left
|
-- sign column to the left
|
||||||
set.statuscolumn = '%s %=%{v:relnum?v:relnum:v:lnum} '
|
set.statuscolumn = '%s %=%{v:relnum?v:relnum:v:lnum} '
|
||||||
|
|
||||||
-- indent
|
-- indent
|
||||||
|
set.expandtab = true
|
||||||
set.tabstop = 4
|
set.tabstop = 4
|
||||||
set.softtabstop = 4
|
set.softtabstop = 4
|
||||||
set.shiftwidth = 4
|
set.shiftwidth = 4
|
||||||
set.autoindent = true
|
set.autoindent = true
|
||||||
set.smartindent = true
|
set.smartindent = true
|
||||||
|
|
||||||
-- Filetypes
|
-- Folding
|
||||||
vim.filetype.add({
|
--set.foldenable = true
|
||||||
pattern = {
|
--set.foldmethod = "expr"
|
||||||
['.*%.blade%.php'] = 'blade',
|
--set.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
},
|
|
||||||
})
|
--vim.api.nvim_create_autocmd('BufReadPost,FileReadPost', {
|
||||||
|
-- pattern = '*',
|
||||||
|
-- cmd = 'normal zR',
|
||||||
|
--})
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Completion
|
||||||
|
set.completeopt = "menuone,longest,preview"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
||||||
local icons = require('config.icons').diagnostics
|
local icons = require('config.icons').diagnostics
|
||||||
vim.fn.sign_define('DiagnosticSignError', { text = icons.error, texthl = 'DiagnosticSignError' })
|
vim.fn.sign_define('DiagnosticSignError', { text = icons.error, texthl = 'DiagnosticSignError' })
|
||||||
vim.fn.sign_define('DiagnosticSignWarn', { text = icons.warn, texthl = 'DiagnosticSignWarn' })
|
vim.fn.sign_define('DiagnosticSignWarn', { text = icons.warn, texthl = 'DiagnosticSignWarn' })
|
||||||
|
|
@ -55,20 +77,20 @@ vim.fn.sign_define('DiagnosticSignInfo', { text = icons.info, texthl = 'Diagnost
|
||||||
vim.fn.sign_define('DiagnosticSignHint', { text = icons.hint, texthl = 'DiagnosticSignHint' })
|
vim.fn.sign_define('DiagnosticSignHint', { text = icons.hint, texthl = 'DiagnosticSignHint' })
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true,
|
virtual_text = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
float = {
|
underline = false,
|
||||||
border = 'single',
|
float = {
|
||||||
source = 'always',
|
-- border = 'single',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Highlight on yank
|
-- Highlight on yank
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
group = vim.api.nvim_create_augroup('highlight_yank', {}),
|
group = vim.api.nvim_create_augroup('highlight_yank', {}),
|
||||||
desc = 'Hightlight selection on yank',
|
desc = 'Hightlight selection on yank',
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank { higroup = 'IncSearch', timeout = 200 }
|
vim.highlight.on_yank { higroup = 'IncSearch', timeout = 200 }
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter'
|
'nvim-treesitter/nvim-treesitter'
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
'html',
|
'html',
|
||||||
'javascript',
|
'javascript',
|
||||||
'typescript',
|
'typescript',
|
||||||
'javascriptreact',
|
'javascriptreact',
|
||||||
'typescriptreact',
|
'typescriptreact',
|
||||||
'svelte',
|
'svelte',
|
||||||
'vue',
|
'vue',
|
||||||
'tsx',
|
'tsx',
|
||||||
'jsx',
|
'jsx',
|
||||||
'rescript',
|
'rescript',
|
||||||
'xml',
|
'xml',
|
||||||
'php',
|
'php',
|
||||||
'blade',
|
'blade',
|
||||||
'markdown',
|
'markdown',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,28 @@
|
||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
opts = {
|
opts = {
|
||||||
debounce = 10,
|
debounce = 10,
|
||||||
indent = {
|
indent = {
|
||||||
char = '▏',
|
char = '▏',
|
||||||
},
|
},
|
||||||
scope = {
|
scope = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
show_start = false,
|
show_start = false,
|
||||||
show_end = false
|
show_end = false
|
||||||
},
|
},
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
'help',
|
'help',
|
||||||
'dashboard'
|
'dashboard'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
config = function (_, opts)
|
config = function(_, opts)
|
||||||
|
require 'ibl'.setup(opts)
|
||||||
|
|
||||||
require 'ibl'.setup(opts)
|
local hooks = require 'ibl.hooks'
|
||||||
|
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_tab_indent_level)
|
||||||
local hooks = require 'ibl.hooks'
|
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
|
||||||
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_tab_indent_level)
|
end
|
||||||
hooks.register(hooks.type.WHITESPACE, hooks.builtin.hide_first_space_indent_level)
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
return {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = function()
|
build = function()
|
||||||
require('nvim-treesitter.install').update({ with_sync = true })
|
require('nvim-treesitter.install').update({ with_sync = true })
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
'nvim-treesitter/playground'
|
'nvim-treesitter/playground'
|
||||||
},
|
},
|
||||||
opts = require('config.plugins.treesitter'),
|
opts = require('config.plugins.treesitter'),
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
||||||
|
|
||||||
parser_config.blade = {
|
parser_config.blade = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = 'https://github.com/EmranMR/tree-sitter-blade',
|
url = 'https://github.com/EmranMR/tree-sitter-blade',
|
||||||
branch = "main",
|
branch = "main",
|
||||||
files = { 'src/parser.c' },
|
files = { 'src/parser.c' },
|
||||||
generate_requires_npm = true,
|
generate_requires_npm = true,
|
||||||
requires_generate_from_grammar = true,
|
requires_generate_from_grammar = true,
|
||||||
},
|
},
|
||||||
filetype = 'blade',
|
filetype = 'blade',
|
||||||
}
|
}
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,82 +1,92 @@
|
||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
},
|
{ 'folke/neodev.nvim', opts = {} },
|
||||||
opts = require('config.plugins.lsp'),
|
},
|
||||||
config = function (_, opts)
|
opts = require('config.plugins.lsp'),
|
||||||
-- Setup Mason to automatically install LSP servers
|
config = function(_, opts)
|
||||||
require('mason').setup()
|
-- Setup Mason to automatically install LSP servers
|
||||||
require('mason-lspconfig').setup({ automatic_installation = true })
|
require('mason').setup()
|
||||||
local augroup = vim.api.nvim_create_augroup("Lsp", {})
|
require('mason-lspconfig').setup({ automatic_installation = true })
|
||||||
local lspconfig = require('lspconfig')
|
local augroup = vim.api.nvim_create_augroup("Lsp", {})
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local lspconfig = require('lspconfig')
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = false
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = false
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||||
vim.lsp.handlers.hover,
|
vim.lsp.handlers.hover,
|
||||||
{border = 'single'}
|
{ border = 'single' }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||||
focusable = true,
|
focusable = true,
|
||||||
style = "minimal",
|
style = "minimal",
|
||||||
border = "single",
|
border = "single",
|
||||||
})
|
})
|
||||||
|
|
||||||
for name, server_opt in pairs(opts.servers) do
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
local on_attach = function(client, bufnr)
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
for bind, settings in pairs(opts.mappings) do
|
virtual_text = false,
|
||||||
vim.keymap.set('n', bind, settings[1], vim.tbl_deep_extend("force", settings[2], { buffer = bufnr }))
|
}
|
||||||
end
|
)
|
||||||
|
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
for name, server_opt in pairs(opts.servers) do
|
||||||
|
local on_attach = function(client, bufnr)
|
||||||
|
for bind, settings in pairs(opts.mappings) do
|
||||||
|
vim.keymap.set('n', bind, settings[1], vim.tbl_deep_extend("force", settings[2], { buffer = bufnr }))
|
||||||
|
end
|
||||||
|
|
||||||
-- Add format on save if configured and client supports it.
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
if server_opt.format_on_save and client.supports_method("textDocument/formatting") then
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
group = augroup,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if server_opt.on_save then
|
-- Add format on save if configured and client supports it.
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
if server_opt.format_on_save and client.supports_method("textDocument/formatting") then
|
||||||
group = augroup,
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = bufnr,
|
group = augroup,
|
||||||
callback = server_opt.on_save,
|
buffer = bufnr,
|
||||||
})
|
callback = function()
|
||||||
end
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("CursorHold", {
|
if server_opt.on_save then
|
||||||
group = augroup,
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = bufnr,
|
group = augroup,
|
||||||
callback = function() vim.lsp.buf.document_highlight() end
|
buffer = bufnr,
|
||||||
})
|
callback = server_opt.on_save,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("CursorHoldI", {
|
|
||||||
group = augroup,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function() vim.lsp.buf.document_highlight() end
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
if client.supports_method("textDocument/documentHighlight") then
|
||||||
group = augroup,
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||||||
buffer = bufnr,
|
group = augroup,
|
||||||
callback = function() vim.lsp.buf.clear_references() end
|
buffer = bufnr,
|
||||||
})
|
callback = function() vim.lsp.buf.document_highlight() end
|
||||||
end
|
})
|
||||||
|
|
||||||
lspconfig[name].setup({
|
vim.api.nvim_create_autocmd("CursorHoldI", {
|
||||||
settings = server_opt.settings or {},
|
group = augroup,
|
||||||
capabilities = capabilities,
|
buffer = bufnr,
|
||||||
on_attach = on_attach
|
callback = function() vim.lsp.buf.document_highlight() end
|
||||||
})
|
})
|
||||||
end
|
|
||||||
end
|
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||||
|
group = augroup,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = function() vim.lsp.buf.clear_references() end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
lspconfig[name].setup({
|
||||||
|
settings = server_opt.settings or {},
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
nvim/lua/plugins/ide/neodev.lua
Normal file
4
nvim/lua/plugins/ide/neodev.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"folke/neodev.nvim",
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
8
nvim/lua/plugins/ide/trouble.lua
Normal file
8
nvim/lua/plugins/ide/trouble.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
local conf = require("config.plugins.trouble") or {}
|
||||||
|
|
||||||
|
return {
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
keys = conf.keys or {},
|
||||||
|
opts = conf.opts or {},
|
||||||
|
}
|
||||||
6
nvim/lua/plugins/ide/undotree.lua
Normal file
6
nvim/lua/plugins/ide/undotree.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
return {
|
||||||
|
"mbbill/undotree",
|
||||||
|
keys = {
|
||||||
|
{"<leader>u", ":UndotreeToggle<CR>", desc = "Toggle undotree"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,62 +1,63 @@
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
dev = {
|
dev = {
|
||||||
path = "~/code/nvim_plugins",
|
path = "~/code/nvim_plugins",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
|
|
||||||
-- Core
|
-- Core
|
||||||
-----------------------------
|
-----------------------------
|
||||||
{ import = "plugins.core.treesitter" },
|
{ import = "plugins.core.treesitter" },
|
||||||
{ import = "plugins.core.autopairs" },
|
{ import = "plugins.core.autopairs" },
|
||||||
{ import = "plugins.core.autotag" },
|
{ import = "plugins.core.autotag" },
|
||||||
{ import = "plugins.core.indent-blankline" },
|
{ import = "plugins.core.indent-blankline" },
|
||||||
|
|
||||||
-- Editor
|
-- Editor
|
||||||
-----------------------------
|
-----------------------------
|
||||||
{ import = "plugins.editor.mini-comment" },
|
{ import = "plugins.editor.mini-comment" },
|
||||||
{ import = "plugins.editor.telescope" },
|
{ import = "plugins.editor.telescope" },
|
||||||
|
|
||||||
-- UI
|
-- UI
|
||||||
-----------------------------
|
-----------------------------
|
||||||
{ import = "plugins.ui.dressing" },
|
{ import = "plugins.ui.catppuccin" },
|
||||||
{ import = "plugins.ui.edgy" },
|
{ import = "plugins.ui.dressing" },
|
||||||
{ import = "plugins.ui.noice" },
|
{ import = "plugins.ui.edgy" },
|
||||||
{ import = "plugins.ui.dashboard" },
|
{ import = "plugins.ui.dashboard" },
|
||||||
{ import = "plugins.ui.catppuccin" },
|
{ import = "plugins.ui.neo-tree" },
|
||||||
{ import = "plugins.ui.neo-tree" },
|
{ import = "plugins.ui.bufferline" },
|
||||||
{ import = "plugins.ui.bufferline" },
|
{ import = "plugins.ui.lualine" },
|
||||||
{ import = "plugins.ui.lualine" },
|
{ import = "plugins.ui.gitsigns" },
|
||||||
{ import = "plugins.ui.gitsigns" },
|
{ import = "plugins.ui.which-key" },
|
||||||
{ import = "plugins.ui.which-key" },
|
|
||||||
|
|
||||||
-- IDE
|
-- IDE
|
||||||
-----------------------------
|
-----------------------------
|
||||||
{ import = "plugins.ide.conform" },
|
{ import = "plugins.ide.trouble" },
|
||||||
{ import = "plugins.ide.cmp" },
|
{ import = "plugins.ide.undotree" },
|
||||||
{ import = "plugins.ide.lsp" },
|
{ import = "plugins.ide.conform" },
|
||||||
{ import = "plugins.ide.dap" },
|
{ import = "plugins.ide.cmp" },
|
||||||
{ import = "plugins.ide.neotest" },
|
{ import = "plugins.ide.lsp" },
|
||||||
{ import = "plugins.ide.copilot" },
|
{ import = "plugins.ide.dap" },
|
||||||
|
{ import = "plugins.ide.neotest" },
|
||||||
|
{ import = "plugins.ide.neodev" },
|
||||||
|
{ import = "plugins.ide.copilot" },
|
||||||
|
|
||||||
-- Language specific
|
-- Language specific
|
||||||
-----------------------------
|
-----------------------------
|
||||||
{ import = "plugins.lang.laravel" },
|
{ import = "plugins.lang.laravel" },
|
||||||
{ import = "plugins.lang.go" },
|
{ import = "plugins.lang.go" },
|
||||||
|
|
||||||
}, opts)
|
}, opts)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
return {
|
return {
|
||||||
"ray-x/go.nvim",
|
"ray-x/go.nvim",
|
||||||
main = "go",
|
main = "go",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"ray-x/guihua.lua",
|
"ray-x/guihua.lua",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
config = function(opts)
|
config = function(opts)
|
||||||
require('go').setup(opts)
|
require('go').setup(opts)
|
||||||
end,
|
end,
|
||||||
event = {"CmdlineEnter"},
|
event = { "CmdlineEnter" },
|
||||||
ft = {"go", 'gomod'},
|
ft = { "go", 'gomod' },
|
||||||
build = ':lua require("go.install").update_all_sync()'
|
build = ':lua require("go.install").update_all_sync()'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
return {
|
return {
|
||||||
"adalessa/laravel.nvim",
|
"adalessa/laravel.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
"tpope/vim-dotenv",
|
"tpope/vim-dotenv",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
},
|
},
|
||||||
ft = "php",
|
ft = "php",
|
||||||
cmd = { "Sail", "Artisan", "Composer", "Npm", "Yarn", "Laravel" },
|
cmd = { "Sail", "Artisan", "Composer", "Npm", "Yarn", "Laravel" },
|
||||||
config = function (_, _)
|
config = function(_, _)
|
||||||
local opts = require('config.plugins.laravel')
|
local opts = require('config.plugins.laravel')
|
||||||
|
|
||||||
local haswk, wk = pcall(require, "which-key")
|
local haswk, wk = pcall(require, "which-key")
|
||||||
|
|
||||||
if haswk then
|
if haswk then
|
||||||
wk.register({l = {name = "laravel" }}, { prefix = "<leader>" })
|
wk.register({ l = { name = "laravel" } }, { prefix = "<leader>" })
|
||||||
end
|
end
|
||||||
|
|
||||||
for key, value in pairs(opts.keys) do
|
for key, value in pairs(opts.keys) do
|
||||||
vim.keymap.set("n", key, value[1], { desc = value[2] or ''})
|
vim.keymap.set("n", key, value[1], { desc = value[2] or '' })
|
||||||
end
|
end
|
||||||
|
|
||||||
require('laravel').setup(opts)
|
require('laravel').setup(opts)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,34 @@
|
||||||
local icons = require('config.icons')
|
local icons = require('config.icons')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'romgrk/barbar.nvim',
|
'romgrk/barbar.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
},
|
},
|
||||||
init = function() vim.g.barbar_auto_setup = false end,
|
init = function() vim.g.barbar_auto_setup = false end,
|
||||||
opts = {
|
opts = {
|
||||||
animation = false,
|
animation = false,
|
||||||
auto_hide = 0,
|
auto_hide = 0,
|
||||||
focus_on_close = 'previous',
|
focus_on_close = 'previous',
|
||||||
button = icons.close,
|
button = icons.close,
|
||||||
highlight_inactive_file_icons = true,
|
highlight_inactive_file_icons = true,
|
||||||
icons = {
|
icons = {
|
||||||
separator = {left = '', right = ''},
|
separator = { left = '', right = '' },
|
||||||
separator_at_end = false,
|
separator_at_end = false,
|
||||||
inactive = { button = '', separator = { left = '', right = ''} },
|
inactive = { button = '', separator = { left = '', right = '' } },
|
||||||
modified = {button = icons.gitsigns.modified },
|
modified = { button = icons.gitsigns.modified },
|
||||||
pinned = {button = icons.pinned, filename = true},
|
pinned = { button = icons.pinned, filename = true },
|
||||||
gitsigns = {
|
gitsigns = {
|
||||||
added = { enabled = false },
|
added = { enabled = false },
|
||||||
changed = { enabled = false },
|
changed = { enabled = false },
|
||||||
deleted = { enabled = false },
|
deleted = { enabled = false },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
maximum_padding = 2,
|
maximum_padding = 2,
|
||||||
minimum_padding = 1,
|
minimum_padding = 1,
|
||||||
sidebar_filetypes = {
|
sidebar_filetypes = {
|
||||||
--['neo-tree'] = {event = 'BufWipeout'},
|
--['neo-tree'] = {event = 'BufWipeout'},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
'akinsho/bufferline.nvim',
|
'akinsho/bufferline.nvim',
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
opts = require('config.plugins.bufferline')
|
opts = require('config.plugins.bufferline')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
return {
|
return {
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
opts = require('config.plugins.catppuccin'),
|
opts = require('config.plugins.catppuccin'),
|
||||||
config = function (_, opts)
|
config = function(_, opts)
|
||||||
require("catppuccin").setup(opts)
|
require("catppuccin").setup(opts)
|
||||||
vim.cmd.colorscheme("catppuccin")
|
vim.cmd.colorscheme("catppuccin")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,91 +2,91 @@ return {
|
||||||
"navarasu/onedark.nvim",
|
"navarasu/onedark.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
opts = {
|
opts = {
|
||||||
style = 'darker',
|
style = 'deep',
|
||||||
code_style = {
|
code_style = {
|
||||||
comments = 'none',
|
comments = 'none',
|
||||||
keywords = 'none',
|
keywords = 'none',
|
||||||
functions = 'none',
|
functions = 'none',
|
||||||
strings = 'none',
|
strings = 'none',
|
||||||
variables = 'none'
|
variables = 'none'
|
||||||
},
|
},
|
||||||
colors = {
|
-- colors = {
|
||||||
fg = '#b3b1b1',
|
-- fg = '#b3b1b1',
|
||||||
bg0 = '#171b26',
|
-- bg0 = '#171b26',
|
||||||
bg1 = '#30323b',
|
-- bg1 = '#30323b',
|
||||||
bg2 = '#24262f',
|
-- bg2 = '#24262f',
|
||||||
bg3 = '#383a43',
|
-- bg3 = '#383a43',
|
||||||
bg_d = "#1f2129",
|
-- bg_d = "#1f2129",
|
||||||
bg_blue = "#ff00ff",
|
-- bg_blue = "#ff00ff",
|
||||||
bg_yellow = "#f0d197",
|
-- bg_yellow = "#f0d197",
|
||||||
red = '#cc4a33',
|
-- red = '#cc4a33',
|
||||||
green = '#51cc7f',
|
-- green = '#51cc7f',
|
||||||
yellow = '#ccaf33',
|
-- yellow = '#ccaf33',
|
||||||
orange = '#ccab1f',
|
-- orange = '#ccab1f',
|
||||||
blue = '#3390cc',
|
-- -- blue = '#3390cc',
|
||||||
cyan = '#33ccb7',
|
-- cyan = '#33ccb7',
|
||||||
purple = '#9233cc',
|
-- purple = '#9233cc',
|
||||||
dark_cyan = "#8abeb7",
|
-- dark_cyan = "#8abeb7",
|
||||||
dark_red = "#cc817f",
|
-- dark_red = "#cc817f",
|
||||||
dark_yellow = "#ffcc99",
|
-- dark_yellow = "#ffcc99",
|
||||||
dark_purple = "#9999cc",
|
-- dark_purple = "#9999cc",
|
||||||
},
|
-- },
|
||||||
highlights = {
|
-- highlights = {
|
||||||
LineNr = { fg = "$light_grey" },
|
-- LineNr = { fg = "$light_grey" },
|
||||||
CursorLineNr = { fg = "$blue" },
|
-- CursorLineNr = { fg = "$blue" },
|
||||||
|
--
|
||||||
Pmenu = { bg = "$bg2"},
|
-- Pmenu = { bg = "$bg2" },
|
||||||
PmenuSel = { bg = "$bg_d", fg = "$fg" },
|
-- PmenuSel = { bg = "$bg_d", fg = "$fg" },
|
||||||
FloatBorder = { fg = "$grey", bg = 'None' },
|
-- FloatBorder = { fg = "$grey", bg = 'None' },
|
||||||
-- Syntax
|
-- -- Syntax
|
||||||
["@comment"] = { fg = "$red" },
|
-- ["@comment"] = { fg = "$red" },
|
||||||
["@string"] = { fg = "$purple" },
|
-- ["@string"] = { fg = "$purple" },
|
||||||
["@function"] = { fg = "$fg" },
|
-- ["@function"] = { fg = "$fg" },
|
||||||
["@keyword"] = { fg = "$yellow" },
|
-- ["@keyword"] = { fg = "$yellow" },
|
||||||
["@keyword.import"] = { fg = "$yellow" },
|
-- ["@keyword.import"] = { fg = "$yellow" },
|
||||||
["@keyword.function"] = { fg = "$yellow" },
|
-- ["@keyword.function"] = { fg = "$yellow" },
|
||||||
["@keyword.conditional"] = { fg = "$yellow" },
|
-- ["@keyword.conditional"] = { fg = "$yellow" },
|
||||||
["@keyword.operator"] = { fg = "$yellow" },
|
-- ["@keyword.operator"] = { fg = "$yellow" },
|
||||||
["@keyword.repeat"] = { fg = "$yellow" },
|
-- ["@keyword.repeat"] = { fg = "$yellow" },
|
||||||
["@constant"] = { fg = "$green" },
|
-- ["@constant"] = { fg = "$green" },
|
||||||
["@tag"] = { fg = "$yellow" },
|
-- ["@tag"] = { fg = "$yellow" },
|
||||||
["@tag.delimiter"] = { fg = "$yellow" },
|
-- ["@tag.delimiter"] = { fg = "$yellow" },
|
||||||
["@tag.attribute"] = { fg = "$yellow" },
|
-- ["@tag.attribute"] = { fg = "$yellow" },
|
||||||
["@type"] = { fg = "$blue" },
|
-- ["@type"] = { fg = "$blue" },
|
||||||
["@type.qualifier"] = { fg = "$yellow" },
|
-- ["@type.qualifier"] = { fg = "$yellow" },
|
||||||
["@type.definition"] = { fg = "$blue" },
|
-- ["@type.definition"] = { fg = "$blue" },
|
||||||
["@type.builtin"] = { fg = "$blue" },
|
-- ["@type.builtin"] = { fg = "$blue" },
|
||||||
["@function.method"] = { fg = "$fg" },
|
-- ["@function.method"] = { fg = "$fg" },
|
||||||
["@function.call"] = { fg = "$fg" },
|
-- ["@function.call"] = { fg = "$fg" },
|
||||||
["@function.builtin"] = { fg = "$fg" },
|
-- ["@function.builtin"] = { fg = "$fg" },
|
||||||
|
--
|
||||||
["@number"] = { fg = "$red" },
|
-- ["@number"] = { fg = "$red" },
|
||||||
["@variable"] = { fg = "$green" },
|
-- ["@variable"] = { fg = "$green" },
|
||||||
["@variable.member"] = { fg = "$green" },
|
-- ["@variable.member"] = { fg = "$green" },
|
||||||
["@variable.builtin"] = { fg = "$green" },
|
-- ["@variable.builtin"] = { fg = "$green" },
|
||||||
["@variable.parameter"] = { fg = "$fg" },
|
-- ["@variable.parameter"] = { fg = "$fg" },
|
||||||
["@property"] = { fg = "$orange" },
|
-- ["@property"] = { fg = "$orange" },
|
||||||
-- ["@property"] = { fg = "$fg" },
|
-- -- ["@property"] = { fg = "$fg" },
|
||||||
["@punctuation.delimiter"] = { fg = "$fg" },
|
-- ["@punctuation.delimiter"] = { fg = "$fg" },
|
||||||
["@punctuation.bracket"] = { fg = "$fg" },
|
-- ["@punctuation.bracket"] = { fg = "$fg" },
|
||||||
["@module"] = { fg = "$fg" },
|
-- ["@module"] = { fg = "$fg" },
|
||||||
|
--
|
||||||
-- php overrides
|
-- -- php overrides
|
||||||
["@class_name.php"] = { fg = "$fg" },
|
-- ["@class_name.php"] = { fg = "$fg" },
|
||||||
["@extend_name.php"] = { fg = "$fg" },
|
-- ["@extend_name.php"] = { fg = "$fg" },
|
||||||
["@implements_name.php"] = { fg = "$fg" },
|
-- ["@implements_name.php"] = { fg = "$fg" },
|
||||||
["@namespace_name.php"] = { fg = "$fg" },
|
-- ["@namespace_name.php"] = { fg = "$fg" },
|
||||||
["@namespace_alias.php"] = { fg = "$fg" },
|
-- ["@namespace_alias.php"] = { fg = "$fg" },
|
||||||
}
|
-- }
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local c = require('onedark')
|
local c = require('onedark')
|
||||||
c.setup(opts)
|
c.setup(opts)
|
||||||
c.load()
|
c.load()
|
||||||
|
|
||||||
vim.cmd(string.format("highlight GitSignsAdd guifg='%s'", opts.colors.green))
|
-- 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 GitSignsChange guifg='%s'", opts.colors.yellow))
|
||||||
vim.cmd(string.format("highlight GitSignsDelete guifg='%s'", opts.colors.red))
|
-- vim.cmd(string.format("highlight GitSignsDelete guifg='%s'", opts.colors.red))
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
local logo = [[
|
local logo = [[
|
||||||
::::::::: :::: ::: ::: :::
|
::::::::: :::: ::: ::: :::
|
||||||
:+: :+: :+:+: :+: :+: :+:
|
:+: :+: :+:+: :+: :+: :+:
|
||||||
+:+ +:+ :+:+:+ +:+ +:+ +:+
|
+:+ +:+ :+:+:+ +:+ +:+ +:+
|
||||||
+#++:++#+ +#+ +:+ +#+ +#++:+
|
+#++:++#+ +#+ +:+ +#+ +#++:+
|
||||||
+#+ +#+ +#+#+# +#+ +#+
|
+#+ +#+ +#+#+# +#+ +#+
|
||||||
#+# #+# #+#+# #+# #+#
|
#+# #+# #+#+# #+# #+#
|
||||||
### ### #### ### ###
|
### ### #### ### ###
|
||||||
]]
|
]]
|
||||||
|
|
@ -12,31 +11,30 @@ local logo = [[
|
||||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'nvimdev/dashboard-nvim',
|
'nvimdev/dashboard-nvim',
|
||||||
name = 'dashboard',
|
name = 'dashboard',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-tree/nvim-web-devicons'
|
'nvim-tree/nvim-web-devicons'
|
||||||
},
|
},
|
||||||
event = 'VimEnter',
|
event = 'VimEnter',
|
||||||
opts = {
|
opts = {
|
||||||
theme = 'doom',
|
theme = 'doom',
|
||||||
config = {
|
config = {
|
||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
|
|
||||||
center = {
|
center = {
|
||||||
{ action = function() require('telescope.builtin').find_files() end, desc = " Find file", icon = " ", key = "f" },
|
{ action = function() require('telescope.builtin').find_files() end, desc = " Find file", icon = " ", key = "f" },
|
||||||
{ action = "ene | startinsert", desc = " New file", icon = " ", key = "n" },
|
{ 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').oldfiles() end, desc = " Recent files", icon = " ", key = "r" },
|
||||||
{ action = function() require('telescope.builtin').live_grep() end, desc = " Find text", icon = " ", key = "g" },
|
{ action = function() require('telescope.builtin').live_grep() end, desc = " Find text", icon = " ", key = "g" },
|
||||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" }
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" }
|
||||||
},
|
},
|
||||||
footer = function()
|
footer = function()
|
||||||
local stats = require("lazy").stats()
|
local stats = require("lazy").stats()
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
return { "Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
return { "Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
return {
|
return {
|
||||||
'stevearc/dressing.nvim',
|
'stevearc/dressing.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
input = {
|
input = {
|
||||||
title_pos = "center",
|
title_pos = "center",
|
||||||
border = "single",
|
border = "single",
|
||||||
relative = "win",
|
relative = "win",
|
||||||
},
|
},
|
||||||
select = {
|
select = {
|
||||||
backend = { "telescope", "builtin" },
|
backend = { "telescope", "builtin" },
|
||||||
telescope = require('telescope.themes').get_dropdown({
|
telescope = require('telescope.themes').get_dropdown({
|
||||||
borderchars = {
|
borderchars = {
|
||||||
prompt = { "─", "│", "─", "│", "┌", "┐", "┘", "└" },
|
prompt = { "─", "│", "─", "│", "┌", "┐", "┘", "└" },
|
||||||
results = { "─", "│", "─", "│", "├", "┤", "┘", "└" },
|
results = { "─", "│", "─", "│", "├", "┤", "┘", "└" },
|
||||||
},
|
},
|
||||||
max_height = 5
|
max_height = 5
|
||||||
}),
|
}),
|
||||||
builtin = {
|
builtin = {
|
||||||
border = "single",
|
border = "single",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,33 @@
|
||||||
return {
|
return {
|
||||||
"folke/edgy.nvim",
|
"folke/edgy.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ue", function() require("edgy").toggle() end, desc = "Edgy Toggle" },
|
{ "<leader>ue", function() require("edgy").toggle() end, desc = "Edgy Toggle" },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{ "<leader>uE", function() require("edgy").select() end, desc = "Edgy Select Window" },
|
{ "<leader>uE", function() require("edgy").select() end, desc = "Edgy Select Window" },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
left = {
|
left = {
|
||||||
{
|
{
|
||||||
title = "Neo-Tree",
|
title = "Neo-Tree",
|
||||||
ft = "neo-tree",
|
ft = "neo-tree",
|
||||||
filter = function(buf)
|
filter = function(buf)
|
||||||
return vim.b[buf].neo_tree_source == "filesystem"
|
return vim.b[buf].neo_tree_source == "filesystem"
|
||||||
end,
|
end,
|
||||||
size = { height = 0.5 },
|
size = { height = 0.5 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title = "Test",
|
title = "Test",
|
||||||
ft = "neotest-summary"
|
ft = "neotest-summary"
|
||||||
},
|
},
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
},
|
},
|
||||||
options = {
|
options = {
|
||||||
left = { size = 40 }
|
left = { size = 40 }
|
||||||
},
|
},
|
||||||
animate = {
|
animate = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
exit_when_last = false
|
exit_when_last = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,31 @@
|
||||||
local icons = require('config.icons').diff_gutter
|
local icons = require('config.icons').diff_gutter
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = {
|
opts = {
|
||||||
defaults = {
|
defaults = {
|
||||||
["<leader>g"] = { name = "+git" },
|
["<leader>g"] = { name = "+git" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>gp', '<cmd>Gitsigns preview_hunk<cr>', desc = 'Git preview diff' },
|
{ '<leader>gp', '<cmd>Gitsigns preview_hunk<cr>', desc = 'Git preview diff' },
|
||||||
{ '<leader>gb', '<cmd>Gitsigns blame_line<cr>', desc = 'Git blame' }
|
{ '<leader>gb', '<cmd>Gitsigns blame_line<cr>', desc = 'Git blame' }
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = icons.add },
|
add = { text = icons.add },
|
||||||
delete = { text = icons.delete },
|
delete = { text = icons.delete },
|
||||||
change = { text = icons.change },
|
change = { text = icons.change },
|
||||||
untracked = { text = icons.untracked },
|
untracked = { text = icons.untracked },
|
||||||
topdelete = { text = icons.delete },
|
topdelete = { text = icons.delete },
|
||||||
changedelete = { text = icons.change },
|
changedelete = { text = icons.change },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,66 +1,9 @@
|
||||||
local icons = require('config.icons')
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'arkav/lualine-lsp-progress',
|
'arkav/lualine-lsp-progress',
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
},
|
},
|
||||||
opts = {
|
opts = require("config.plugins.lualine")
|
||||||
options = {
|
|
||||||
theme = "catppuccin-mocha",
|
|
||||||
component_separators = '',
|
|
||||||
globalstatus = true,
|
|
||||||
section_separators = { left = '', right = '' },
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {
|
|
||||||
'dashboard',
|
|
||||||
'TelescopePrompt'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { "mode" },
|
|
||||||
lualine_b = { "branch" },
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
"diagnostics",
|
|
||||||
symbols = {
|
|
||||||
error = icons.diagnostics.error .. ' ',
|
|
||||||
warn = icons.diagnostics.warn .. ' ',
|
|
||||||
info = icons.diagnostics.info .. ' ',
|
|
||||||
hint = icons.diagnostics.hint .. ' ',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
require("lazy.status").updates,
|
|
||||||
cond = require("lazy.status").has_updates,
|
|
||||||
color = { fg = "#ff9e64" },
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- "diff",
|
|
||||||
-- symbols = {
|
|
||||||
-- added = icons.diff.added .. ' ',
|
|
||||||
-- modified = icons.diff.modified .. ' ',
|
|
||||||
-- removed = icons.diff.removed .. ' '
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
'filename'
|
|
||||||
},
|
|
||||||
lualine_y = {
|
|
||||||
'encoding',
|
|
||||||
'fileformat',
|
|
||||||
'filetype',
|
|
||||||
'location'
|
|
||||||
},
|
|
||||||
lualine_z = {}
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
'lazy',
|
|
||||||
'neo-tree'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ return {
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
cmd = 'Neotree',
|
cmd = 'Neotree',
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>fe', ':Neotree reveal toggle<CR>', desc = 'Toggle File Explorer'},
|
{ '<leader>Fe', ':Neotree reveal toggle<CR>', desc = 'Toggle File Explorer'},
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
return {
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
cmdline = {
|
|
||||||
enabled = true,
|
|
||||||
view = "cmdline"
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
bottom_search = true,
|
|
||||||
command_palette = false
|
|
||||||
},
|
|
||||||
commands = {
|
|
||||||
history = {
|
|
||||||
view = "cmdline_output",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
views = {
|
|
||||||
mini = {
|
|
||||||
position = {
|
|
||||||
row = -2,
|
|
||||||
},
|
|
||||||
border = {
|
|
||||||
style = 'solid',
|
|
||||||
padding = { 0, 1 },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
init = function()
|
init = function()
|
||||||
vim.o.timeout = true
|
vim.o.timeout = true
|
||||||
vim.o.timeoutlen = 300
|
vim.o.timeoutlen = 300
|
||||||
end,
|
end,
|
||||||
opts = require('config.plugins.which-key'),
|
opts = require('config.plugins.which-key'),
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.setup(opts)
|
wk.setup(opts)
|
||||||
wk.register(opts.defaults or {})
|
wk.register(opts.defaults or {})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
21
nvim/lua/utils/lspkind.lua
Normal file
21
nvim/lua/utils/lspkind.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- Create format function.
|
||||||
|
function M.format(config)
|
||||||
|
return function(entry, vim_item)
|
||||||
|
-- Devicons for files
|
||||||
|
if vim.tbl_contains({ 'path' }, entry.source.name) then
|
||||||
|
local icon, hl_group = require('nvim-web-devicons').get_icon(entry:get_completion_item().label)
|
||||||
|
if icon then
|
||||||
|
vim_item.kind = icon
|
||||||
|
vim_item.kind_hl_group = hl_group
|
||||||
|
return vim_item
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return require('lspkind').cmp_format(config)(entry, vim_item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Loading…
Add table
Add a link
Reference in a new issue