REFACTOR: Heavy refactor of layout and ui and plugin optimizations
This commit is contained in:
@@ -1,28 +1,5 @@
|
|||||||
--- Options
|
|
||||||
require('DarthMooMancer.plugins')
|
|
||||||
require('DarthMooMancer.opts')
|
require('DarthMooMancer.opts')
|
||||||
require('DarthMooMancer.colors')
|
require('DarthMooMancer.plugins')
|
||||||
require('DarthMooMancer.keymaps')
|
require('DarthMooMancer.keymaps')
|
||||||
require('DarthMooMancer.ui')
|
require('DarthMooMancer.ui')
|
||||||
require('DarthMooMancer.lsp')
|
require('DarthMooMancer.lsp')
|
||||||
require('DarthMooMancer.tools')
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
pattern = {
|
|
||||||
'c',
|
|
||||||
'cpp',
|
|
||||||
'rust',
|
|
||||||
'lua',
|
|
||||||
'typescript',
|
|
||||||
'javascript',
|
|
||||||
'css',
|
|
||||||
'html',
|
|
||||||
'python',
|
|
||||||
'go',
|
|
||||||
'yaml',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.treesitter.start()
|
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
require('kanso').setup({
|
|
||||||
transparent = true,
|
|
||||||
-- foreground = {
|
|
||||||
-- dark = "saturated", -- Use default colors in dark mode
|
|
||||||
-- },
|
|
||||||
overrides = function(colors)
|
|
||||||
local theme = colors.theme
|
|
||||||
return {
|
|
||||||
Normal = { bg = "none" },
|
|
||||||
NormalFloat = { bg = "none" },
|
|
||||||
FloatBorder = { bg = "none" },
|
|
||||||
FloatTitle = { bg = "none" },
|
|
||||||
TelescopeBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
TelescopePromptBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
TelescopeResultsBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
TelescopePreviewBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
NotifyBackground = { bg = "none" },
|
|
||||||
NotifyBorder = { fg = theme.ui.special, bg = "none" },
|
|
||||||
NotifyBody = { fg = theme.ui.fg, bg = "none" },
|
|
||||||
NotifyTitle = { fg = theme.ui.special, bg = "none" },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.cmd.colorscheme('kanso-zen')
|
|
||||||
@@ -11,36 +11,36 @@ vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
|||||||
vim.keymap.set('n', 'n', 'nzzzv')
|
vim.keymap.set('n', 'n', 'nzzzv')
|
||||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
vim.keymap.set('n', 'N', 'Nzzzv')
|
||||||
vim.keymap.set('x', '<leader>p', [["_dP]])
|
vim.keymap.set('x', '<leader>p', [["_dP]])
|
||||||
local builtin = require('telescope.builtin')
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader><leader>',
|
'<leader><leader>',
|
||||||
builtin.find_files,
|
function() Snacks.picker.files() end
|
||||||
{ desc = 'Telescope find files' }
|
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>fh',
|
'<leader>fh',
|
||||||
builtin.help_tags,
|
function() Snacks.picker.help() end
|
||||||
{ desc = 'Telescope help tags' }
|
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>fg',
|
'<leader>fg',
|
||||||
builtin.live_grep,
|
function() Snacks.picker.grep() end
|
||||||
{ desc = 'Telescope live grep' }
|
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>fm',
|
'<leader>fm',
|
||||||
builtin.man_pages,
|
function() Snacks.picker.man() end
|
||||||
{ desc = 'Telescope man_pages' }
|
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>xn',
|
'<leader>xn',
|
||||||
':Telescope notify<CR>',
|
function() Snacks.picker.notifications() end
|
||||||
{ desc = 'Telescope notify' }
|
)
|
||||||
|
|
||||||
|
vim.keymap.set(
|
||||||
|
'n',
|
||||||
|
'<leader>uu',
|
||||||
|
function() Snacks.picker.undo() end
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>fs', vim.lsp.buf.document_symbol)
|
vim.keymap.set('n', '<leader>fs', vim.lsp.buf.document_symbol)
|
||||||
@@ -48,7 +48,6 @@ vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition)
|
|||||||
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references)
|
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references)
|
||||||
vim.keymap.set('n', '<leader>gR', vim.lsp.buf.rename)
|
vim.keymap.set('n', '<leader>gR', vim.lsp.buf.rename)
|
||||||
vim.keymap.set('n', '<leader>gc', vim.lsp.buf.code_action)
|
vim.keymap.set('n', '<leader>gc', vim.lsp.buf.code_action)
|
||||||
vim.keymap.set('n', '<leader>uu', ':UndotreeToggle<CR>')
|
|
||||||
vim.keymap.set('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
|
vim.keymap.set('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
|
||||||
vim.keymap.set('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
|
vim.keymap.set('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
|
||||||
vim.keymap.set('n', '[q', ':cprev<CR>zz', { desc = 'Previous Quickfix Item' })
|
vim.keymap.set('n', '[q', ':cprev<CR>zz', { desc = 'Previous Quickfix Item' })
|
||||||
@@ -61,8 +60,4 @@ vim.keymap.set('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true })
|
|||||||
vim.keymap.set('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
|
vim.keymap.set('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true })
|
vim.keymap.set('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true })
|
||||||
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<cr>')
|
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<cr>')
|
||||||
vim.keymap.set('n', '<leader>zz', ':ZenMode<cr>')
|
vim.keymap.set('n', '<leader>zz', function() Snacks.zen() end)
|
||||||
local dropbar_api = require("dropbar.api")
|
|
||||||
vim.keymap.set("n", "<Leader>;", dropbar_api.pick, { desc = "Pick symbols in winbar" })
|
|
||||||
vim.keymap.set("n", "[;", dropbar_api.goto_context_start, { desc = "Go to start of current context" })
|
|
||||||
vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" })
|
|
||||||
|
|||||||
@@ -1,53 +1,3 @@
|
|||||||
require('mason').setup()
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'vtsls',
|
|
||||||
'lua_ls',
|
|
||||||
'pylsp',
|
|
||||||
'gopls',
|
|
||||||
'html',
|
|
||||||
'cssls',
|
|
||||||
'bashls',
|
|
||||||
},
|
|
||||||
automatic_enable = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
require('nvim-treesitter').install({
|
|
||||||
'rust',
|
|
||||||
'c',
|
|
||||||
'cpp',
|
|
||||||
'lua',
|
|
||||||
'javascript',
|
|
||||||
'go',
|
|
||||||
'typescript',
|
|
||||||
'css',
|
|
||||||
'html',
|
|
||||||
'python',
|
|
||||||
'yaml',
|
|
||||||
})
|
|
||||||
|
|
||||||
require('conform').setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
rust = { 'rustfmt', lsp_format = 'fallback' },
|
|
||||||
lua = { 'stylua', lsp_format = 'fallback' },
|
|
||||||
javascript = { 'prettier', stop_after_first = true },
|
|
||||||
typescript = { 'prettier', stop_after_first = true },
|
|
||||||
json = { 'prettier' },
|
|
||||||
html = { 'prettier' },
|
|
||||||
go = { 'goimports' },
|
|
||||||
c = { 'clang-format' },
|
|
||||||
cpp = { 'clang-format' },
|
|
||||||
css = { 'csskit' },
|
|
||||||
dart = { 'dart_format', lsp_format = 'fallback' },
|
|
||||||
python = { 'autopep8' },
|
|
||||||
['_'] = { 'trim_whitespace' },
|
|
||||||
},
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 2000,
|
|
||||||
lsp_format = 'fallback',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
vim.lsp.config('lua_ls', {
|
vim.lsp.config('lua_ls', {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
|||||||
@@ -62,4 +62,17 @@ vim.diagnostic.config({
|
|||||||
update_in_insert = false, -- Don't clutter the screen while typing
|
update_in_insert = false, -- Don't clutter the screen while typing
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
})
|
})
|
||||||
vim.o.winborder = "rounded"
|
vim.o.winborder = 'rounded'
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = { 'text', 'plaintex' },
|
||||||
|
callback = function()
|
||||||
|
-- Enable visual soft-wrapping
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.linebreak = true
|
||||||
|
vim.opt_local.breakindent = true
|
||||||
|
|
||||||
|
-- Remap j/k to visual lines only inside this buffer
|
||||||
|
vim.keymap.set('n', 'j', 'gj', { buffer = true })
|
||||||
|
vim.keymap.set('n', 'k', 'gk', { buffer = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,43 +1,12 @@
|
|||||||
vim.pack.add({
|
require('DarthMooMancer.plugins.utils')
|
||||||
-- Themes
|
require('DarthMooMancer.plugins.blink-cmp')
|
||||||
{ src = 'https://github.com/webhooked/kanso.nvim' },
|
require('DarthMooMancer.plugins.kanso')
|
||||||
|
require('DarthMooMancer.plugins.mini-nvim')
|
||||||
-- The rest
|
require('DarthMooMancer.plugins.polydev')
|
||||||
{ src = 'https://github.com/mbbill/undotree' },
|
require('DarthMooMancer.plugins.treesitter')
|
||||||
{
|
require('DarthMooMancer.plugins.incline')
|
||||||
src = 'https://github.com/nvim-mini/mini.pairs',
|
require('DarthMooMancer.plugins.mason')
|
||||||
version = vim.version.range('*'),
|
require('DarthMooMancer.plugins.noice')
|
||||||
},
|
require('DarthMooMancer.plugins.snacks')
|
||||||
{
|
require('DarthMooMancer.plugins.trouble')
|
||||||
src = 'https://github.com/nvim-mini/mini.hipatterns',
|
require('DarthMooMancer.plugins.conform')
|
||||||
version = vim.version.range('*'),
|
|
||||||
},
|
|
||||||
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
|
|
||||||
{ src = 'https://github.com/nvim-telescope/telescope.nvim' },
|
|
||||||
{
|
|
||||||
src = 'https://github.com/saghen/blink.cmp',
|
|
||||||
version = vim.version.range('*'),
|
|
||||||
},
|
|
||||||
{ src = 'https://git.moomancer.xyz/DarthMooMancer/polydev.git' },
|
|
||||||
{
|
|
||||||
src = 'https://github.com/nvim-treesitter/nvim-treesitter',
|
|
||||||
build = ':TSUpdate',
|
|
||||||
},
|
|
||||||
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
|
|
||||||
{ src = 'https://github.com/mason-org/mason.nvim' },
|
|
||||||
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
|
|
||||||
{ src = 'https://github.com/neovim/nvim-lspconfig' },
|
|
||||||
{ src = 'https://github.com/stevearc/conform.nvim' },
|
|
||||||
{ src = 'https://github.com/b0o/incline.nvim' },
|
|
||||||
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
|
|
||||||
{ src = 'https://github.com/MunifTanjim/nui.nvim' },
|
|
||||||
{ src = 'https://github.com/nvim-lua/plenary.nvim' },
|
|
||||||
{ src = 'https://github.com/folke/noice.nvim' },
|
|
||||||
-- { src = 'https://github.com/stevearc/dressing.nvim' },
|
|
||||||
{ src = 'https://github.com/rcarriga/nvim-notify' },
|
|
||||||
{ src = 'https://github.com/folke/trouble.nvim' },
|
|
||||||
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
|
|
||||||
{ src = 'https://github.com/m4xshen/hardtime.nvim' },
|
|
||||||
{ src = 'https://github.com/Bekaboo/dropbar.nvim' },
|
|
||||||
{ src = 'https://github.com/folke/zen-mode.nvim' },
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{
|
||||||
|
src = 'https://github.com/saghen/blink.cmp',
|
||||||
|
version = vim.version.range('*'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
require('blink.cmp').setup({
|
||||||
|
completion = {
|
||||||
|
documentation = {
|
||||||
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 100,
|
||||||
|
window = {
|
||||||
|
winhighlight = 'Normal:NormalFloat,FloatBorder:SnacksPickerBorder,CursorLine:Visual,Search:None',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
draw = {
|
||||||
|
columns = {
|
||||||
|
{ "label", "label_description", gap = 1 },
|
||||||
|
{ "kind_icon", "kind", gap = 1 },
|
||||||
|
{ "source_name", gap = 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
scrollbar = false,
|
||||||
|
winhighlight =
|
||||||
|
'Pmenu:NormalFloat,FloatBorder:SnacksPickerBorder,PmenuSel:Visual,CursorLine:Visual,Search:None',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
vim.pack.add({ 'https://github.com/stevearc/conform.nvim' })
|
||||||
|
|
||||||
|
require('conform').setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
rust = { 'rustfmt', lsp_format = 'fallback' },
|
||||||
|
lua = { 'stylua', lsp_format = 'fallback' },
|
||||||
|
javascript = { 'prettier', stop_after_first = true },
|
||||||
|
typescript = { 'prettier', stop_after_first = true },
|
||||||
|
json = { 'prettier' },
|
||||||
|
html = { 'prettier' },
|
||||||
|
go = { 'goimports' },
|
||||||
|
c = { 'clang-format' },
|
||||||
|
cpp = { 'clang-format' },
|
||||||
|
css = { 'csskit' },
|
||||||
|
dart = { 'dart_format', lsp_format = 'fallback' },
|
||||||
|
python = { 'autopep8' },
|
||||||
|
['_'] = { 'trim_whitespace' },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 2000,
|
||||||
|
lsp_format = 'fallback',
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/b0o/incline.nvim' },
|
||||||
|
{ src = 'https://github.com/SmiteshP/nvim-navic' },
|
||||||
|
})
|
||||||
|
|
||||||
|
local helpers = require('incline.helpers')
|
||||||
|
local navic = require('nvim-navic')
|
||||||
|
local devicons = require('nvim-web-devicons')
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('UserNavicAttach', { clear = true }),
|
||||||
|
callback = function(args)
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
if client and client.server_capabilities.documentSymbolProvider then
|
||||||
|
navic.attach(client, args.buf)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
require('incline').setup({
|
||||||
|
window = {
|
||||||
|
padding = 0,
|
||||||
|
margin = { horizontal = 0, vertical = 0 },
|
||||||
|
},
|
||||||
|
render = function(props)
|
||||||
|
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t')
|
||||||
|
if filename == '' then
|
||||||
|
filename = '[No Name]'
|
||||||
|
end
|
||||||
|
local ft_icon, ft_color = devicons.get_icon_color(filename)
|
||||||
|
local modified = vim.bo[props.buf].modified
|
||||||
|
local res = {
|
||||||
|
ft_icon and { ' ', ft_icon, ' ', guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or '',
|
||||||
|
' ',
|
||||||
|
{ filename, gui = modified and 'bold,italic' or 'bold' },
|
||||||
|
guibg = "none",
|
||||||
|
}
|
||||||
|
if props.focused then
|
||||||
|
for _, item in ipairs(navic.get_data(props.buf) or {}) do
|
||||||
|
table.insert(res, {
|
||||||
|
{ ' > ', group = 'NavicSeparator' },
|
||||||
|
{ item.icon, group = 'NavicIcons' .. item.type },
|
||||||
|
{ item.name, group = 'NavicText' },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.insert(res, ' ')
|
||||||
|
return res
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
vim.pack.add({'https://github.com/webhooked/kanso.nvim' })
|
||||||
|
|
||||||
|
require('kanso').setup({
|
||||||
|
transparent = true,
|
||||||
|
overrides = function(colors)
|
||||||
|
local theme = colors.theme
|
||||||
|
return {
|
||||||
|
Normal = { bg = "none" },
|
||||||
|
NormalFloat = { bg = "none" },
|
||||||
|
FloatBorder = { bg = "none" },
|
||||||
|
FloatTitle = { bg = "none" },
|
||||||
|
SnacksPickerBorder = { fg = theme.ui.special, bg = "none" },
|
||||||
|
SnacksPickerTitle = { fg = theme.ui.special, bg = "none" },
|
||||||
|
SnacksInputBorder = { fg = theme.ui.special, bg = "none" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd.colorscheme('kanso-zen')
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/mason-org/mason.nvim' },
|
||||||
|
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
|
||||||
|
{ src = 'https://github.com/neovim/nvim-lspconfig' },
|
||||||
|
})
|
||||||
|
|
||||||
|
require('mason').setup()
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {
|
||||||
|
'vtsls',
|
||||||
|
'lua_ls',
|
||||||
|
'pylsp',
|
||||||
|
'gopls',
|
||||||
|
'html',
|
||||||
|
'cssls',
|
||||||
|
'bashls',
|
||||||
|
},
|
||||||
|
automatic_enable = false,
|
||||||
|
})
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{
|
||||||
|
src = 'https://github.com/nvim-mini/mini.nvim.git',
|
||||||
|
version = vim.version.range('*')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local hipatterns = require('mini.hipatterns')
|
||||||
|
hipatterns.setup({
|
||||||
|
highlighters = {
|
||||||
|
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
|
||||||
|
fixme = {
|
||||||
|
pattern = '%f[%w]()FIXME()%f[%W]',
|
||||||
|
group = 'MiniHipatternsFixme',
|
||||||
|
},
|
||||||
|
hack = {
|
||||||
|
pattern = '%f[%w]()HACK()%f[%W]',
|
||||||
|
group = 'MiniHipatternsHack',
|
||||||
|
},
|
||||||
|
todo = {
|
||||||
|
pattern = '%f[%w]()TODO()%f[%W]',
|
||||||
|
group = 'MiniHipatternsTodo',
|
||||||
|
},
|
||||||
|
note = {
|
||||||
|
pattern = '%f[%w]()NOTE()%f[%W]',
|
||||||
|
group = 'MiniHipatternsNote',
|
||||||
|
},
|
||||||
|
|
||||||
|
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require('mini.pairs').setup()
|
||||||
|
-- require('mini.icons').setup()
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/folke/noice.nvim' },
|
||||||
|
{ src = 'https://github.com/MunifTanjim/nui.nvim' },
|
||||||
|
})
|
||||||
|
|
||||||
|
require('noice').setup({
|
||||||
|
lsp = {
|
||||||
|
override = {
|
||||||
|
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||||
|
['vim.lsp.util.stylize_markdown'] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
presets = {
|
||||||
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.pack.add({'https://git.moomancer.xyz/DarthMooMancer/polydev.git' })
|
||||||
|
|
||||||
|
require('Polydev').setup()
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
vim.pack.add({ 'https://github.com/folke/snacks.nvim' })
|
||||||
|
|
||||||
|
require('snacks').setup({
|
||||||
|
notifier = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
animate = { enabled = true },
|
||||||
|
input = { enabled = true },
|
||||||
|
picker = {
|
||||||
|
enabled = true,
|
||||||
|
prompt = ' ',
|
||||||
|
|
||||||
|
icons = {
|
||||||
|
ui = {
|
||||||
|
selected = ' ',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
layout = {
|
||||||
|
preview = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zen = {
|
||||||
|
enabled = true,
|
||||||
|
toggles = {
|
||||||
|
dim = false,
|
||||||
|
diagnostics = true,
|
||||||
|
inlay_hints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{
|
||||||
|
src = 'https://github.com/nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
},
|
||||||
|
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
|
||||||
|
})
|
||||||
|
|
||||||
|
require('nvim-treesitter').install({
|
||||||
|
'rust',
|
||||||
|
'c',
|
||||||
|
'cpp',
|
||||||
|
'lua',
|
||||||
|
'javascript',
|
||||||
|
'go',
|
||||||
|
'typescript',
|
||||||
|
'css',
|
||||||
|
'html',
|
||||||
|
'python',
|
||||||
|
'yaml',
|
||||||
|
})
|
||||||
|
|
||||||
|
require('nvim-ts-autotag').setup({
|
||||||
|
opts = {
|
||||||
|
enable_close = true, -- Auto close tags
|
||||||
|
enable_rename = true, -- Auto rename pairs of tags
|
||||||
|
enable_close_on_slash = false, -- Auto close on trailing </
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
pattern = {
|
||||||
|
'c',
|
||||||
|
'cpp',
|
||||||
|
'rust',
|
||||||
|
'lua',
|
||||||
|
'typescript',
|
||||||
|
'javascript',
|
||||||
|
'css',
|
||||||
|
'html',
|
||||||
|
'python',
|
||||||
|
'go',
|
||||||
|
'yaml',
|
||||||
|
},
|
||||||
|
callback = function()
|
||||||
|
vim.treesitter.start()
|
||||||
|
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
vim.pack.add({ 'https://github.com/folke/trouble.nvim' })
|
||||||
|
require('trouble').setup({})
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
|
||||||
|
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
|
||||||
|
|
||||||
|
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
|
||||||
|
{ src = 'https://github.com/m4xshen/hardtime.nvim' },
|
||||||
|
})
|
||||||
|
|
||||||
|
require('nvim-tmux-navigation').setup({
|
||||||
|
disable_when_zoomed = true, -- defaults to false
|
||||||
|
})
|
||||||
|
|
||||||
|
require("hardtime").setup()
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
local hipatterns = require('mini.hipatterns')
|
|
||||||
hipatterns.setup({
|
|
||||||
highlighters = {
|
|
||||||
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
|
|
||||||
fixme = {
|
|
||||||
pattern = '%f[%w]()FIXME()%f[%W]',
|
|
||||||
group = 'MiniHipatternsFixme',
|
|
||||||
},
|
|
||||||
hack = {
|
|
||||||
pattern = '%f[%w]()HACK()%f[%W]',
|
|
||||||
group = 'MiniHipatternsHack',
|
|
||||||
},
|
|
||||||
todo = {
|
|
||||||
pattern = '%f[%w]()TODO()%f[%W]',
|
|
||||||
group = 'MiniHipatternsTodo',
|
|
||||||
},
|
|
||||||
note = {
|
|
||||||
pattern = '%f[%w]()NOTE()%f[%W]',
|
|
||||||
group = 'MiniHipatternsNote',
|
|
||||||
},
|
|
||||||
|
|
||||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require('mini.pairs').setup()
|
|
||||||
require('nvim-tmux-navigation').setup({
|
|
||||||
disable_when_zoomed = true, -- defaults to false
|
|
||||||
})
|
|
||||||
|
|
||||||
-- require("zen-mode").toggle({
|
|
||||||
-- })
|
|
||||||
|
|
||||||
require('blink.cmp').setup({
|
|
||||||
completion = {
|
|
||||||
documentation = {
|
|
||||||
auto_show = true,
|
|
||||||
auto_show_delay_ms = 100,
|
|
||||||
window = {
|
|
||||||
winhighlight = 'Normal:NormalFloat,FloatBorder:TelescopeBorder,CursorLine:Visual,Search:None',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
menu = {
|
|
||||||
draw = {
|
|
||||||
columns = {
|
|
||||||
{ "label", "label_description", gap = 1 },
|
|
||||||
{ "kind_icon", "kind", gap = 1 },
|
|
||||||
{ "source_name", gap = 1 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
scrollbar = false,
|
|
||||||
winhighlight =
|
|
||||||
'Pmenu:NormalFloat,FloatBorder:TelescopeBorder,PmenuSel:TelescopeSelection,CursorLine:TelescopeSelection,Search:None',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require('Polydev').setup()
|
|
||||||
require('nvim-ts-autotag').setup({
|
|
||||||
opts = {
|
|
||||||
enable_close = true, -- Auto close tags
|
|
||||||
enable_rename = true, -- Auto rename pairs of tags
|
|
||||||
enable_close_on_slash = false, -- Auto close on trailing </
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
require('trouble').setup({})
|
|
||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = " ", -- Changes the search icon/prompt prefix
|
|
||||||
selection_caret = " ", -- Changes the arrow/caret next to the selected item
|
|
||||||
layout_strategy = "horizontal",
|
|
||||||
layout_config = {
|
|
||||||
horizontal = {
|
|
||||||
prompt_position = 'top',
|
|
||||||
prompt_min_width = 40,
|
|
||||||
prompt_max_width = 80,
|
|
||||||
preview_width = 80,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sorting_strategy = "ascending",
|
|
||||||
preview = {
|
|
||||||
hide_on_startup = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("hardtime").setup()
|
|
||||||
@@ -100,7 +100,7 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'FocusGained' }, {
|
|||||||
--- LSP progress (Neovim 0.10+ built-in handler)
|
--- LSP progress (Neovim 0.10+ built-in handler)
|
||||||
local progress = {}
|
local progress = {}
|
||||||
local spinner_frames =
|
local spinner_frames =
|
||||||
{ '⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷' }
|
{ '⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷' }
|
||||||
|
|
||||||
local frame = 0
|
local frame = 0
|
||||||
--- Clean stale progress messages periodically
|
--- Clean stale progress messages periodically
|
||||||
@@ -294,35 +294,3 @@ function _G.__statusline()
|
|||||||
end
|
end
|
||||||
|
|
||||||
vim.o.statusline = '%!v:lua.__statusline()'
|
vim.o.statusline = '%!v:lua.__statusline()'
|
||||||
|
|
||||||
require('incline').setup({
|
|
||||||
window = { margin = { vertical = 0, horizontal = 1 } },
|
|
||||||
hide = { cursorline = true },
|
|
||||||
render = function(props)
|
|
||||||
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
|
|
||||||
if vim.bo[props.buf].modified then
|
|
||||||
filename = "[+] " .. filename
|
|
||||||
end
|
|
||||||
|
|
||||||
local icon, color = require("nvim-web-devicons").get_icon_color(filename)
|
|
||||||
return { { icon, guifg = color }, { " " }, { filename } }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
require('noice').setup({
|
|
||||||
lsp = {
|
|
||||||
override = {
|
|
||||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
|
||||||
['vim.lsp.util.stylize_markdown'] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require('notify').setup({
|
|
||||||
background_colour = '#000000',
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -9,12 +9,8 @@
|
|||||||
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
"src": "https://github.com/stevearc/conform.nvim"
|
||||||
},
|
},
|
||||||
"dropbar.nvim": {
|
|
||||||
"rev": "808ba31cde89aec8833e9789f5e04557cd31c9e1",
|
|
||||||
"src": "https://github.com/Bekaboo/dropbar.nvim"
|
|
||||||
},
|
|
||||||
"hardtime.nvim": {
|
"hardtime.nvim": {
|
||||||
"rev": "5165840fe680eab46de1fc6dbff48f148fdcf018",
|
"rev": "721a75b9a0c2eb1fb811d34507708ee315cb04eb",
|
||||||
"src": "https://github.com/m4xshen/hardtime.nvim"
|
"src": "https://github.com/m4xshen/hardtime.nvim"
|
||||||
},
|
},
|
||||||
"incline.nvim": {
|
"incline.nvim": {
|
||||||
@@ -30,21 +26,16 @@
|
|||||||
"src": "https://github.com/brianhuster/live-preview.nvim"
|
"src": "https://github.com/brianhuster/live-preview.nvim"
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "b5576cd62899a1a478d0e67ef3d378ee55dba82d",
|
"rev": "b3298993d55fa194279b5eb9dbfb3a43da65cadf",
|
||||||
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
"mini.hipatterns": {
|
"mini.nvim": {
|
||||||
"rev": "607d604e650cdf21d71f863d040c496a1d0cb320",
|
"rev": "1345d191bb3da9c7b0e977f4387c5761f9bff68d",
|
||||||
"src": "https://github.com/nvim-mini/mini.hipatterns",
|
"src": "https://github.com/nvim-mini/mini.nvim.git",
|
||||||
"version": ">=0.0.0"
|
|
||||||
},
|
|
||||||
"mini.pairs": {
|
|
||||||
"rev": "4a014143fcb4e9df26198ccb3ecff3b9e77a048c",
|
|
||||||
"src": "https://github.com/nvim-mini/mini.pairs",
|
|
||||||
"version": ">=0.0.0"
|
"version": ">=0.0.0"
|
||||||
},
|
},
|
||||||
"noice.nvim": {
|
"noice.nvim": {
|
||||||
@@ -56,52 +47,40 @@
|
|||||||
"src": "https://github.com/MunifTanjim/nui.nvim"
|
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||||
},
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "84b6b6c3f13cb34a6c8a0354b0da4c67d8ccf867",
|
"rev": "3e8d598d3b5f8338a41699c436e5fa11d2666cf0",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-notify": {
|
"nvim-navic": {
|
||||||
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
|
"rev": "455808fd0fae06e6d70fadfd61432275db8f34ce",
|
||||||
"src": "https://github.com/rcarriga/nvim-notify"
|
"src": "https://github.com/SmiteshP/nvim-navic"
|
||||||
},
|
},
|
||||||
"nvim-tmux-navigation": {
|
"nvim-tmux-navigation": {
|
||||||
"rev": "4898c98702954439233fdaf764c39636681e2861",
|
"rev": "4898c98702954439233fdaf764c39636681e2861",
|
||||||
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"rev": "5cb0114e6242625db56dd6440e945ed1ece10bc7",
|
"rev": "910fdf6f49e9dee7e7257c7d11a76b040fdfb9de",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
"nvim-ts-autotag": {
|
"nvim-ts-autotag": {
|
||||||
"rev": "88c1453db4ba7dd24131086fe51fdf74e587d275",
|
"rev": "d7220b55e16ed3c04e88086256def5d282429493",
|
||||||
"src": "https://github.com/windwp/nvim-ts-autotag"
|
"src": "https://github.com/windwp/nvim-ts-autotag"
|
||||||
},
|
},
|
||||||
"nvim-web-devicons": {
|
"nvim-web-devicons": {
|
||||||
"rev": "5f032a85be210cd1c6ac98861eb3b187ff3bd5eb",
|
"rev": "58447c1fca354bbf184425e4a8d01deecbd6f3c4",
|
||||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
"plenary.nvim": {
|
|
||||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
"polydev": {
|
"polydev": {
|
||||||
"rev": "2b30e36fade3272081f7166bc0ec614b0b7da1c9",
|
"rev": "2b30e36fade3272081f7166bc0ec614b0b7da1c9",
|
||||||
"src": "https://git.moomancer.xyz/DarthMooMancer/polydev.git"
|
"src": "https://git.moomancer.xyz/DarthMooMancer/polydev.git"
|
||||||
},
|
},
|
||||||
"telescope.nvim": {
|
"snacks.nvim": {
|
||||||
"rev": "40aedd8a68c78a656a10a8d62d80c54af59420fb",
|
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
|
||||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
"src": "https://github.com/folke/snacks.nvim"
|
||||||
},
|
},
|
||||||
"trouble.nvim": {
|
"trouble.nvim": {
|
||||||
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a",
|
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a",
|
||||||
"src": "https://github.com/folke/trouble.nvim"
|
"src": "https://github.com/folke/trouble.nvim"
|
||||||
},
|
|
||||||
"undotree": {
|
|
||||||
"rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d",
|
|
||||||
"src": "https://github.com/mbbill/undotree"
|
|
||||||
},
|
|
||||||
"zen-mode.nvim": {
|
|
||||||
"rev": "8564ce6d29ec7554eb9df578efa882d33b3c23a7",
|
|
||||||
"src": "https://github.com/folke/zen-mode.nvim"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user