+46
-2
@@ -1,11 +1,55 @@
|
|||||||
{
|
{
|
||||||
"languageserver": {
|
"suggest.noselect": true,
|
||||||
|
"suggest.enablePreselect": false,
|
||||||
|
"suggest.triggerAfterInsertEnter": true,
|
||||||
|
"inlineSuggest.autoTrigger": false,
|
||||||
|
"suggest.completionItemKindLabels": {
|
||||||
|
"text": "",
|
||||||
|
"method": "",
|
||||||
|
"function": "",
|
||||||
|
"constructor": "",
|
||||||
|
"field": "",
|
||||||
|
"variable": "",
|
||||||
|
"class": "",
|
||||||
|
"interface": "",
|
||||||
|
"module": "",
|
||||||
|
"property": "",
|
||||||
|
"unit": "",
|
||||||
|
"value": "",
|
||||||
|
"enum": "",
|
||||||
|
"keyword": "",
|
||||||
|
"snippet": "",
|
||||||
|
"color": "",
|
||||||
|
"file": "",
|
||||||
|
"reference": "",
|
||||||
|
"folder": "",
|
||||||
|
"enumMember": "",
|
||||||
|
"constant": "",
|
||||||
|
"struct": "",
|
||||||
|
"event": "",
|
||||||
|
"operator": "",
|
||||||
|
"typeParameter": "",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
|
"suggest.floatConfig": {
|
||||||
|
"maxWidth": 80,
|
||||||
|
"winblend": 1,
|
||||||
|
},
|
||||||
|
"suggest.virtualText": false,
|
||||||
|
|
||||||
|
"languageserver": {
|
||||||
"hyprlang": {
|
"hyprlang": {
|
||||||
"command": "hyprls",
|
"command": "hyprls",
|
||||||
"filetypes": ["hyprlang"]
|
"filetypes": ["hyprlang"]
|
||||||
}
|
},
|
||||||
|
"qml": {
|
||||||
|
"command": "qmlls6",
|
||||||
|
"filetypes": ["qml"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"git.addedSign.hlGroup": "GitGutterAdd",
|
"git.addedSign.hlGroup": "GitGutterAdd",
|
||||||
"git.changedSign.hlGroup": "GitGutterChange",
|
"git.changedSign.hlGroup": "GitGutterChange",
|
||||||
"git.removedSign.hlGroup": "GitGutterDelete",
|
"git.removedSign.hlGroup": "GitGutterDelete",
|
||||||
|
"coc.source.file.enable": true,
|
||||||
|
"coc.source.file.ignoreHidden": false,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
let it_SI = "\e[5 q"
|
||||||
|
let &t_EI = "\e[2 q"
|
||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
local config = {
|
local ionfig = {
|
||||||
cmd = {'/usr/bin/jdtls'},
|
cmd = {'/usr/bin/jdtls'},
|
||||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||||
}
|
}
|
||||||
require('jdtls').start_or_attach(config)
|
require('jdtls').start_or_attach(config)
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
local gen_hook = MiniSplitjoin.gen_hook
|
||||||
|
|
||||||
|
local curly = { brackets = { '%b{}' }}
|
||||||
|
local add_comma_curly = gen_hook.add_trailing_separator(curly)
|
||||||
|
local remove_comma_curly = gen_hook.del_trailing_separator(curly)
|
||||||
|
local pad_curly = gen_hook.pad_brackets(curly)
|
||||||
|
|
||||||
|
vim.b.minisplitjoin_config = {
|
||||||
|
split = { hooks_post = { add_comma_curly }},
|
||||||
|
join = { hooks_post = { remove_comma_curly, pad_curly }},
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
local gen_hook = MiniSplitjoin.gen_hook
|
||||||
|
|
||||||
|
local curly = { brackets = { '%b{}' }, separator = ';' }
|
||||||
|
local curly_semi = { brackets = { '%b{}' }, separator = ';' }
|
||||||
|
local add_semicolon_curly = gen_hook.add_trailing_separator(curly)
|
||||||
|
local remove_semicolon_curly = gen_hook.del_trailing_separator(curly)
|
||||||
|
local pad_curly = gen_hook.pad_brackets(curly_semi)
|
||||||
|
|
||||||
|
vim.b.minisplitjoin_config = {
|
||||||
|
split = { hooks_post = { remove_semicolon_curly }},
|
||||||
|
join = { hooks_pre = { add_semicolon_curly }, hooks_post = { pad_curly }},
|
||||||
|
}
|
||||||
@@ -1,18 +1,30 @@
|
|||||||
|
if vim.env.PROF then
|
||||||
|
local snacks = vim.fn.stdpath("data") .. "/lazy/snacks.nvim"
|
||||||
|
|
||||||
|
vim.opt.rtp:append( snacks )
|
||||||
|
require("snacks.profiler").startup({
|
||||||
|
startup = {
|
||||||
|
event = "UIEnter",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd('source ' .. vim.fn.stdpath("config") .. "/cursor.vim")
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
require("options")
|
require("options")
|
||||||
require("globals")
|
require("globals")
|
||||||
require("mappings")
|
require("mappings")
|
||||||
require("autocmd")
|
require("autocmd")
|
||||||
|
require("minimodules").load_modules()
|
||||||
|
-- require("coc-settings")
|
||||||
|
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
require("config.neovide")
|
require("config.neovide")
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*/hypr/.*%.conf"] = "hyprlang",
|
[".*/hypr/.*%.conf"] = "hyprlang",
|
||||||
[".*/uwsm/env.*"] = "zsh",
|
[".*/uwsm/env.*"] = "zsh",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.cmd[[colorscheme onedark]]
|
|
||||||
|
|||||||
+16
-3
@@ -1,7 +1,20 @@
|
|||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
autocmd("LspAttach", {
|
autocmd("LspAttach", {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
vim.lsp.document_color.enable(false, args.buf, { "background" })
|
local client = vim.lsp.get_client_by_id( args.data.client_id )
|
||||||
end,
|
if client then
|
||||||
|
vim.lsp.document_color.enable(false, args.buf, { "background" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
autocmd("VimLeave", {
|
||||||
|
command = "set guicursor=a:ver25-Cursor"
|
||||||
|
})
|
||||||
|
|
||||||
|
autocmd({ "CursorHold" }, {
|
||||||
|
callback = function()
|
||||||
|
vim.diagnostic.open_float(nil, { focus = false })
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
vimiopt.backup = false
|
||||||
|
vim.opt.writebackup = false
|
||||||
|
vim.opt.completeopt = "menuone,menu,noinsert,noselect,popup"
|
||||||
|
vim.opt.pumheight = 10
|
||||||
|
|
||||||
|
vim.opt.updatetime = 300
|
||||||
|
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
local keyset = vim.keymap.set
|
||||||
|
function _G.check_back_space()
|
||||||
|
local col = vim.fn.col('.') - 1
|
||||||
|
return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Use Tab for trigger completion with characters ahead and navigate
|
||||||
|
-- NOTE: There's always a completion item selected by default, you may want to enable
|
||||||
|
-- no select by setting `"suggest.noselect": true` in your configuration file
|
||||||
|
-- NOTE: Use command ':verbose imap <tab>' to make sure Tab is not mapped by
|
||||||
|
-- other plugins before putting this into your config
|
||||||
|
local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false}
|
||||||
|
keyset("i", "<TAB>", 'coc#pum#visible() ? coc#pum#next(0) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()', opts)
|
||||||
|
keyset("i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(0) : "\<C-h>"]], opts)
|
||||||
|
|
||||||
|
-- Make <CR> to accept selected completion item or notify coc.nvim to format
|
||||||
|
-- <C-g>u breaks current undo, please make your own choice
|
||||||
|
|
||||||
|
keyset("i", "<cr>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]], opts)
|
||||||
|
|
||||||
|
-- Use <c-j> to trigger snippets
|
||||||
|
keyset("i", "<c-j>", "<Plug>(coc-snippets-expand-jump)")
|
||||||
|
-- Use <c-space> to trigger completion
|
||||||
|
keyset("i", "<c-space>", "coc#refresh()", {silent = true, expr = true})
|
||||||
|
|
||||||
|
-- Use `[g` and `]g` to navigate diagnostics
|
||||||
|
-- Use `:CocDiagnostics` to get all diagnostics of current buffer in location list
|
||||||
|
keyset("n", "[g", "<Plug>(coc-diagnostic-prev)", {silent = true})
|
||||||
|
keyset("n", "]g", "<Plug>(coc-diagnostic-next)", {silent = true})
|
||||||
|
|
||||||
|
-- GoTo code navigation
|
||||||
|
keyset("n", "gd", "<Plug>(coc-definition)", {silent = true})
|
||||||
|
keyset("n", "gy", "<Plug>(coc-type-definition)", {silent = true})
|
||||||
|
keyset("n", "gi", "<Plug>(coc-implementation)", {silent = true})
|
||||||
|
keyset("n", "gr", "<Plug>(coc-references)", {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Use K to show documentation in preview window
|
||||||
|
function _G.show_docs()
|
||||||
|
local cw = vim.fn.expand('<cword>')
|
||||||
|
if vim.fn.index({'vim', 'help'}, vim.bo.filetype) >= 0 then
|
||||||
|
vim.api.nvim_command('h ' .. cw)
|
||||||
|
elseif vim.api.nvim_eval('coc#rpc#ready()') then
|
||||||
|
vim.fn.CocActionAsync('doHover')
|
||||||
|
else
|
||||||
|
vim.api.nvim_command('!' .. vim.o.keywordprg .. ' ' .. cw)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
keyset("n", "K", '<CMD>lua _G.show_docs()<CR>', {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Highlight the symbol and its references on a CursorHold event(cursor is idle)
|
||||||
|
vim.api.nvim_create_augroup("CocGroup", {})
|
||||||
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||||||
|
group = "CocGroup",
|
||||||
|
command = "silent call CocActionAsync('highlight')",
|
||||||
|
desc = "Highlight symbol under cursor on CursorHold"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Symbol renaming
|
||||||
|
keyset("n", "<leader>rn", "<Plug>(coc-rename)", {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Formatting selected code
|
||||||
|
keyset("x", "<leader>f", "<Plug>(coc-format-selected)", {silent = true})
|
||||||
|
keyset("n", "<leader>f", "<Plug>(coc-format-selected)", {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Setup formatexpr specified filetype(s)
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = "CocGroup",
|
||||||
|
pattern = "typescript,json",
|
||||||
|
command = "setl formatexpr=CocAction('formatSelected')",
|
||||||
|
desc = "Setup formatexpr specified filetype(s)."
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Apply codeAction to the selected region
|
||||||
|
-- Example: `<leader>aap` for current paragraph
|
||||||
|
local opts = {silent = true, nowait = true}
|
||||||
|
keyset("x", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
|
||||||
|
keyset("n", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
|
||||||
|
|
||||||
|
-- Remap keys for apply code actions at the cursor position.
|
||||||
|
keyset("n", "<leader>ac", "<Plug>(coc-codeaction-cursor)", opts)
|
||||||
|
-- Remap keys for apply source code actions for current file.
|
||||||
|
keyset("n", "<leader>as", "<Plug>(coc-codeaction-source)", opts)
|
||||||
|
-- Apply the most preferred quickfix action on the current line.
|
||||||
|
keyset("n", "<leader>qf", "<Plug>(coc-fix-current)", opts)
|
||||||
|
|
||||||
|
-- Remap keys for apply refactor code actions.
|
||||||
|
keyset("n", "<leader>re", "<Plug>(coc-codeaction-refactor)", { silent = true })
|
||||||
|
keyset("x", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true })
|
||||||
|
keyset("n", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true })
|
||||||
|
|
||||||
|
-- Run the Code Lens actions on the current line
|
||||||
|
keyset("n", "<leader>cl", "<Plug>(coc-codelens-action)", opts)
|
||||||
|
|
||||||
|
|
||||||
|
-- Map function and class text objects
|
||||||
|
-- NOTE: Requires 'textDocument.documentSymbol' support from the language server
|
||||||
|
keyset("x", "if", "<Plug>(coc-funcobj-i)", opts)
|
||||||
|
keyset("o", "if", "<Plug>(coc-funcobj-i)", opts)
|
||||||
|
keyset("x", "af", "<Plug>(coc-funcobj-a)", opts)
|
||||||
|
keyset("o", "af", "<Plug>(coc-funcobj-a)", opts)
|
||||||
|
keyset("x", "ic", "<Plug>(coc-classobj-i)", opts)
|
||||||
|
keyset("o", "ic", "<Plug>(coc-classobj-i)", opts)
|
||||||
|
keyset("x", "ac", "<Plug>(coc-classobj-a)", opts)
|
||||||
|
keyset("o", "ac", "<Plug>(coc-classobj-a)", opts)
|
||||||
|
|
||||||
|
|
||||||
|
-- Remap <C-f> and <C-b> to scroll float windows/popups
|
||||||
|
---@diagnostic disable-next-line: redefined-local
|
||||||
|
local opts = {silent = true, nowait = true, expr = true}
|
||||||
|
keyset("n", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts)
|
||||||
|
keyset("n", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts)
|
||||||
|
keyset("i", "<C-f>",
|
||||||
|
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(1)<cr>" : "<Right>"', opts)
|
||||||
|
keyset("i", "<C-b>",
|
||||||
|
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(0)<cr>" : "<Left>"', opts)
|
||||||
|
keyset("v", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts)
|
||||||
|
keyset("v", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts)
|
||||||
|
|
||||||
|
|
||||||
|
-- Use CTRL-S for selections ranges
|
||||||
|
-- Requires 'textDocument/selectionRange' support of language server
|
||||||
|
keyset("n", "<C-s>", "<Plug>(coc-range-select)", {silent = true})
|
||||||
|
keyset("x", "<C-s>", "<Plug>(coc-range-select)", {silent = true})
|
||||||
|
|
||||||
|
|
||||||
|
-- Add `:Format` command to format current buffer
|
||||||
|
vim.api.nvim_create_user_command("Format", "call CocAction('format')", {})
|
||||||
|
|
||||||
|
-- " Add `:Fold` command to fold current buffer
|
||||||
|
vim.api.nvim_create_user_command("Fold", "call CocAction('fold', <f-args>)", {nargs = '?'})
|
||||||
|
|
||||||
|
-- Add `:OR` command for organize imports of the current buffer
|
||||||
|
vim.api.nvim_create_user_command("OR", "call CocActionAsync('runCommand', 'editor.action.organizeImport')", {})
|
||||||
|
|
||||||
|
-- Add (Neo)Vim's native statusline support
|
||||||
|
-- NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||||
|
-- provide custom statusline: lightline.vim, vim-airline
|
||||||
|
vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}")
|
||||||
|
|
||||||
|
-- Mappings for CoCList
|
||||||
|
-- code actions and coc stuff
|
||||||
|
---@diagnostic disable-next-line: redefined-local
|
||||||
|
local opts = {silent = true, nowait = true}
|
||||||
|
-- Show all diagnostics
|
||||||
|
keyset("n", "<space>a", ":<C-u>CocList diagnostics<cr>", opts)
|
||||||
|
-- Manage extensions
|
||||||
|
keyset("n", "<space>m", ":<C-u>CocList extensions<cr>", opts)
|
||||||
|
-- Show commands
|
||||||
|
keyset("n", "<space>c", ":<C-u>CocList commands<cr>", opts)
|
||||||
|
-- Find symbol of current document
|
||||||
|
keyset("n", "<space>o", ":<C-u>CocList outline<cr>", opts)
|
||||||
|
-- Search workspace symbols
|
||||||
|
keyset("n", "<space>s", ":<C-u>CocList -I symbols<cr>", opts)
|
||||||
|
-- Do default action for next item
|
||||||
|
keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts)
|
||||||
|
-- Do default action for previous item
|
||||||
|
keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts)
|
||||||
|
-- Resume latest coc list
|
||||||
|
keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts)
|
||||||
+32
-32
@@ -1,34 +1,34 @@
|
|||||||
require("bufferline").setup ({
|
require("bufferline").setup ({
|
||||||
options = {
|
options = {
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
local s = " "
|
local s = " "
|
||||||
for e, n in pairs(diagnostics_dict) do
|
for e, n in pairs(diagnostics_dict) do
|
||||||
local sym = e == "error" and " "
|
local sym = e == "error" and " "
|
||||||
or (e == "warning" and " " or " ")
|
or (e == "warning" and " " or " ")
|
||||||
s = s .. n .. sym
|
s = s .. n .. sym
|
||||||
end
|
end
|
||||||
return s
|
return s
|
||||||
end,
|
end,
|
||||||
show_close_icon = false,
|
show_close_icon = false,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
always_show_bufferline = true,
|
always_show_bufferline = true,
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "NvimTree",
|
filetype = "NvimTree",
|
||||||
text = "Explorer",
|
text = "Explorer",
|
||||||
text_align = "center",
|
text_align = "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filetype = "snacks_layout_box",
|
filetype = "snacks_layout_box",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
|
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
pcall(nvim_bufferline)
|
pcall(nvim_bufferline)
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+36
-36
@@ -1,38 +1,38 @@
|
|||||||
require("chatgpt").setup({
|
require("chatgpt").setup({
|
||||||
api_host_cmd = "echo http://localhost:5000",
|
api_host_cmd = "echo http://localhost:5000",
|
||||||
api_key_cmd = "echo ''",
|
api_key_cmd = "echo ''",
|
||||||
openai_params = {
|
openai_params = {
|
||||||
model = "Selene-1-Mini-Llama-3.1-8B-EXL3",
|
model = "Selene-1-Mini-Llama-3.1-8B-EXL3",
|
||||||
frequency_penalty = 0,
|
frequency_penalty = 0,
|
||||||
presence_penalty = 0,
|
presence_penalty = 0,
|
||||||
max_tokens = 1024,
|
max_tokens = 1024,
|
||||||
temperature = 0.1,
|
temperature = 0.1,
|
||||||
top_p = 1,
|
top_p = 1,
|
||||||
n = 1,
|
n = 1,
|
||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
close = "<C-c>",
|
close = "<C-c>",
|
||||||
close_n = "<Esc>",
|
close_n = "<Esc>",
|
||||||
yank_last = "<C-y>",
|
yank_last = "<C-y>",
|
||||||
yank_last_code = "<C-k>",
|
yank_last_code = "<C-k>",
|
||||||
scroll_up = "<C-u>",
|
scroll_up = "<C-u>",
|
||||||
scroll_down = "<C-d>",
|
scroll_down = "<C-d>",
|
||||||
new_session = "<C-l>",
|
new_session = "<C-l>",
|
||||||
cycle_windows = "<Tab>",
|
cycle_windows = "<Tab>",
|
||||||
cycle_modes = "<C-f>",
|
cycle_modes = "<C-f>",
|
||||||
next_message = "<C-j>",
|
next_message = "<C-j>",
|
||||||
prev_message = "<C-k>",
|
prev_message = "<C-k>",
|
||||||
select_session = "<Space>",
|
select_session = "<Space>",
|
||||||
rename_session = "r",
|
rename_session = "r",
|
||||||
delete_session = "d",
|
delete_session = "d",
|
||||||
draft_message = "<C-r>",
|
draft_message = "<C-r>",
|
||||||
edit_message = "e",
|
edit_message = "e",
|
||||||
delete_message = "d",
|
delete_message = "d",
|
||||||
toggle_settings = "<C-o>",
|
toggle_settings = "<C-o>",
|
||||||
toggle_sessions = "<C-p>",
|
toggle_sessions = "<C-p>",
|
||||||
toggle_help = "<C-h>",
|
toggle_help = "<C-h>",
|
||||||
toggle_message_role = "<C-r>",
|
toggle_message_role = "<C-r>",
|
||||||
toggle_system_role_open = "<C-s>",
|
toggle_system_role_open = "<C-s>",
|
||||||
stop_generating = "<C-x>",
|
stop_generating = "<C-x>",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+33
-32
@@ -1,39 +1,40 @@
|
|||||||
local cmp_kinds = {
|
local cmp_kinds = {
|
||||||
Text = ' ',
|
Text = ' ',
|
||||||
Method = ' ',
|
Method = ' ',
|
||||||
Function = ' ',
|
Function = ' ',
|
||||||
Constructor = ' ',
|
Constructor = ' ',
|
||||||
Field = ' ',
|
Field = ' ',
|
||||||
Variable = ' ',
|
Variable = ' ',
|
||||||
Class = ' ',
|
Class = ' ',
|
||||||
Interface = ' ',
|
Interface = ' ',
|
||||||
Module = ' ',
|
Module = ' ',
|
||||||
Property = ' ',
|
Property = ' ',
|
||||||
Unit = ' ',
|
Unit = ' ',
|
||||||
Value = ' ',
|
Value = ' ',
|
||||||
Enum = ' ',
|
Enum = ' ',
|
||||||
Keyword = ' ',
|
Keyword = ' ',
|
||||||
Snippet = ' ',
|
Snippet = ' ',
|
||||||
Color = ' ',
|
Color = ' ',
|
||||||
File = ' ',
|
File = ' ',
|
||||||
Reference = ' ',
|
Reference = ' ',
|
||||||
Folder = ' ',
|
Folder = ' ',
|
||||||
EnumMember = ' ',
|
EnumMember = ' ',
|
||||||
Constant = ' ',
|
Constant = ' ',
|
||||||
Struct = ' ',
|
Struct = ' ',
|
||||||
Event = ' ',
|
Event = ' ',
|
||||||
Operator = ' ',
|
Operator = ' ',
|
||||||
TypeParameter = ' ',
|
TypeParameter = ' ',
|
||||||
}
|
}
|
||||||
|
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
formatting = {
|
preselect = 'None',
|
||||||
fields = { 'kind', 'abbr' },
|
formatting = {
|
||||||
format = function(_, vim_item)
|
fields = { 'kind', 'abbr' },
|
||||||
vim_item.kind = cmp_kinds[vim_item.kind] or ''
|
format = function(_, vim_item)
|
||||||
return vim_item
|
vim_item.kind = cmp_kinds[vim_item.kind] or ''
|
||||||
end,
|
return vim_item
|
||||||
}
|
end,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
require("colorizer").setup({
|
require("colorizer").setup({
|
||||||
user_default_options = {
|
user_default_options = {
|
||||||
mode = "virtualtext",
|
mode = "virtualtext",
|
||||||
virtualtext = "■",
|
virtualtext = "■",
|
||||||
css = true,
|
css = true,
|
||||||
tailwind = true,
|
tailwind = true,
|
||||||
sass = { enable = true, parsers = { "css" }},
|
sass = { enable = true, parsers = { "css" }},
|
||||||
virtualtext_inline = 'before',
|
virtualtext_inline = 'before',
|
||||||
},
|
AARRGGBB = true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+57
-62
@@ -1,64 +1,59 @@
|
|||||||
require("copilot").setup({
|
require("copilot").setup({
|
||||||
panel = {
|
panel = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
auto_refresh = true,
|
auto_refresh = true,
|
||||||
keymap = {
|
keymap = {
|
||||||
jump_prev = "[[",
|
jump_prev = "[[",
|
||||||
jump_next = "]]",
|
jump_next = "]]",
|
||||||
accept = "<CR>",
|
accept = "<CR>",
|
||||||
refresh = "gr",
|
refresh = "gr",
|
||||||
open = "<M-CR>"
|
open = "<M-CR>"
|
||||||
},
|
},
|
||||||
layout = {
|
layout = {
|
||||||
position = "bottom", -- | top | left | right | horizontal | vertical
|
position = "bottom", -- | top | left | right | horizontal | vertical
|
||||||
ratio = 0.4
|
ratio = 0.4
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
suggestion = {
|
suggestion = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
auto_trigger = true,
|
auto_trigger = true,
|
||||||
hide_during_completion = true,
|
hide_during_completion = true,
|
||||||
debounce = 75,
|
debounce = 75,
|
||||||
keymap = {
|
keymap = {
|
||||||
accept = "<A-tab>",
|
accept = "<A-tab>",
|
||||||
accept_word = false,
|
accept_word = false,
|
||||||
accept_line = false,
|
accept_line = false,
|
||||||
next = "<M-]>",
|
next = "<M-]>",
|
||||||
prev = "<M-[>",
|
prev = "<M-[>",
|
||||||
dismiss = "<C-]>",
|
dismiss = "<C-]>",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = {
|
filetypes = {
|
||||||
-- yaml = false,
|
-- yaml = false,
|
||||||
-- markdown = false,
|
-- markdown = false,
|
||||||
-- help = false,
|
-- help = false,
|
||||||
-- gitcommit = false,
|
-- gitcommit = false,
|
||||||
-- gitrebase = false,
|
-- gitrebase = false,
|
||||||
-- hgcommit = false,
|
-- hgcommit = false,
|
||||||
-- svn = false,
|
-- svn = false,
|
||||||
-- cvs = false,
|
-- cvs = false,
|
||||||
-- python = false,
|
-- python = false,
|
||||||
-- html = false,
|
-- html = false,
|
||||||
-- css = false,
|
-- css = false,
|
||||||
-- sh = false,
|
-- sh = false,
|
||||||
-- tex = false,
|
-- tex = false,
|
||||||
-- typescript = false,
|
-- typescript = false,
|
||||||
-- java = false,
|
-- java = false,
|
||||||
-- swift = false,
|
-- swift = false,
|
||||||
-- cpp = false,
|
-- cpp = false,
|
||||||
-- hypr = false,
|
-- hypr = false,
|
||||||
-- ["."] = false,
|
-- ["."] = false,
|
||||||
},
|
},
|
||||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
copilot_node_command = 'node',
|
||||||
server_opts_overrides = {},
|
server_opts_overrides = {},
|
||||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd( "CopilotChatSave AutoSave" )
|
vim.cmd( "CopilotChatSave AutoSave" )
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
vim.api.nvim_create_autocmd( "VimEnter", {
|
|
||||||
callback = function()
|
|
||||||
vim.cmd( "CopilotChatLoad AutoSave" )
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
})
|
})
|
||||||
|
|||||||
+33
-32
@@ -1,41 +1,42 @@
|
|||||||
require("CopilotChat").setup {
|
require("CopilotChat").setup {
|
||||||
prompts = {
|
-- system_prompt = "You are an assistant helping the user with whatever they need, but you are also a bit of an asshole.",
|
||||||
},
|
prompts = {
|
||||||
|
},
|
||||||
|
|
||||||
sticky = "#glob:**/*",
|
headers = {
|
||||||
|
user = ' You: ',
|
||||||
|
assistant = ' Copilot: ',
|
||||||
|
tool = ' Tool: ',
|
||||||
|
},
|
||||||
|
|
||||||
headers = {
|
temperature = 0.2,
|
||||||
user = ' You: ',
|
|
||||||
assistant = ' Copilot: ',
|
|
||||||
tool = ' Tool: ',
|
|
||||||
},
|
|
||||||
|
|
||||||
providers = {
|
providers = {
|
||||||
tabby = {
|
tabby = {
|
||||||
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
|
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
|
||||||
prepare_output = require('CopilotChat.config.providers').copilot.prepare_output,
|
prepare_output = require('CopilotChat.config.providers').copilot.prepare_output,
|
||||||
|
|
||||||
get_models = function(headers)
|
get_models = function(headers)
|
||||||
local response, err = require('CopilotChat.utils').curl_get('http://localhost:5000/v1/models', {
|
local response, err = require('CopilotChat.utils').curl_get('http://localhost:5000/v1/models', {
|
||||||
headers = headers,
|
headers = headers,
|
||||||
json_response = true
|
json_response = true
|
||||||
})
|
})
|
||||||
|
|
||||||
if err then
|
if err then
|
||||||
error(err)
|
error(err)
|
||||||
end
|
end
|
||||||
|
|
||||||
return vim.tbl_map(function(model)
|
return vim.tbl_map(function(model)
|
||||||
return {
|
return {
|
||||||
id = model.id,
|
id = model.id,
|
||||||
name = model.id,
|
name = model.id,
|
||||||
}
|
}
|
||||||
end, response.body.data)
|
end, response.body.data)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
get_url = function()
|
get_url = function()
|
||||||
return 'http://localhost:5000/v1/chat/completions'
|
return 'http://localhost:5000/v1/chat/completions'
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+85
-85
@@ -1,106 +1,106 @@
|
|||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
dap.adapters.python = function(cb, config)
|
dap.adapters.python = function(cb, config)
|
||||||
if config.request == 'attach' then
|
if config.request == 'attach' then
|
||||||
---@diagnostic disable-next-line: undefined-field
|
---@diagnostic disable-next-line: undefined-field
|
||||||
local port = (config.connect or config).port
|
local port = (config.connect or config).port
|
||||||
---@diagnostic disable-next-line: undefined-field
|
---@diagnostic disable-next-line: undefined-field
|
||||||
local host = (config.connect or config).host or '127.0.0.1'
|
local host = (config.connect or config).host or '127.0.0.1'
|
||||||
cb({
|
cb({
|
||||||
type = 'server',
|
type = 'server',
|
||||||
port = assert(port, '`connect.port` is required for a python `attach` configuration'),
|
port = assert(port, '`connect.port` is required for a python `attach` configuration'),
|
||||||
host = host,
|
host = host,
|
||||||
options = {
|
options = {
|
||||||
source_filetype = 'python',
|
source_filetype = 'python',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
cb({
|
cb({
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = 'path/to/virtualenvs/debugpy/bin/python',
|
command = 'path/to/virtualenvs/debugpy/bin/python',
|
||||||
args = { '-m', 'debugpy.adapter' },
|
args = { '-m', 'debugpy.adapter' },
|
||||||
options = {
|
options = {
|
||||||
source_filetype = 'python',
|
source_filetype = 'python',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dap.configurations.python = {
|
dap.configurations.python = {
|
||||||
{
|
{
|
||||||
-- The first three options are required by nvim-dap
|
-- The first three options are required by nvim-dap
|
||||||
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
|
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||||
request = 'launch';
|
request = 'launch';
|
||||||
name = "Launch file";
|
name = "Launch file";
|
||||||
|
|
||||||
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||||
|
|
||||||
program = "${file}"; -- This configuration will launch the current file if used.
|
program = "${file}"; -- This configuration will launch the current file if used.
|
||||||
pythonPath = function()
|
pythonPath = function()
|
||||||
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||||
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||||
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||||
local cwd = vim.fn.getcwd()
|
local cwd = vim.fn.getcwd()
|
||||||
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
||||||
return cwd .. '/venv/bin/python'
|
return cwd .. '/venv/bin/python'
|
||||||
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
||||||
return cwd .. '/.venv/bin/python'
|
return cwd .. '/.venv/bin/python'
|
||||||
else
|
else
|
||||||
return '/home/zach/miniconda3/bin/python'
|
return '/home/zach/miniconda3/bin/python'
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path
|
command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path
|
||||||
name = 'lldb'
|
name = 'lldb'
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = 'Launch',
|
name = 'Launch',
|
||||||
type = 'lldb',
|
type = 'lldb',
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
end,
|
end,
|
||||||
cwd = '${workspaceFolder}',
|
cwd = '${workspaceFolder}',
|
||||||
stopOnEntry = false,
|
stopOnEntry = false,
|
||||||
args = {},
|
args = {},
|
||||||
|
|
||||||
-- 💀
|
-- 💀
|
||||||
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
|
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
|
||||||
--
|
--
|
||||||
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
|
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
|
||||||
--
|
--
|
||||||
-- Otherwise you might get the following error:
|
-- Otherwise you might get the following error:
|
||||||
--
|
--
|
||||||
-- Error on launch: Failed to attach to the target process
|
-- Error on launch: Failed to attach to the target process
|
||||||
--
|
--
|
||||||
-- But you should be aware of the implications:
|
-- But you should be aware of the implications:
|
||||||
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
|
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
|
||||||
-- runInTerminal = false,
|
-- runInTerminal = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters["pwa-node"] = {
|
dap.adapters["pwa-node"] = {
|
||||||
type = "server",
|
type = "server",
|
||||||
host = "localhost",
|
host = "localhost",
|
||||||
port = "${port}",
|
port = "${port}",
|
||||||
executable = {
|
executable = {
|
||||||
command = "node",
|
command = "node",
|
||||||
-- 💀 Make sure to update this path to point to your installation
|
-- 💀 Make sure to update this path to point to your installation
|
||||||
args = {"/home/zach/.config/nvim/java-dap/js-debug/src/dapDebugServer.js", "${port}"},
|
args = {"/home/zach/.config/nvim/java-dap/js-debug/src/dapDebugServer.js", "${port}"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.javascript = {
|
dap.configurations.javascript = {
|
||||||
{
|
{
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
name = "Launch file",
|
name = "Launch file",
|
||||||
program = "${file}",
|
program = "${file}",
|
||||||
cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
require("gruvbox").setup({
|
||||||
|
variant = "hard",
|
||||||
|
dark_variant = "medium",
|
||||||
|
dim_inactive_windows = false,
|
||||||
|
extend_background_behind_borders = false,
|
||||||
|
|
||||||
|
enable = {
|
||||||
|
terminal = true,
|
||||||
|
legacy_highlights = true,
|
||||||
|
migrations = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
styles = {
|
||||||
|
bold = true,
|
||||||
|
italic = true,
|
||||||
|
transparency = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
groups = {
|
||||||
|
border = "gray",
|
||||||
|
link = "purple_lite",
|
||||||
|
panel = "bg_second",
|
||||||
|
|
||||||
|
error = "red_lite",
|
||||||
|
hint = "aqua_lite",
|
||||||
|
info = "blue_lite",
|
||||||
|
ok = "green_lite",
|
||||||
|
warn = "yellow_lite",
|
||||||
|
note = "yellow_dark",
|
||||||
|
todo = "aqua_dark",
|
||||||
|
|
||||||
|
git_add = "green_dark",
|
||||||
|
git_change = "yellow_dark",
|
||||||
|
git_delete = "red_dark",
|
||||||
|
git_dirty = "orange_dark",
|
||||||
|
git_ignore = "gray",
|
||||||
|
git_merge = "purple_dark",
|
||||||
|
git_rename = "blue_dark",
|
||||||
|
git_stage = "purple_dark",
|
||||||
|
git_text = "yellow_lite",
|
||||||
|
git_untracked = "bg2",
|
||||||
|
|
||||||
|
h1 = "red_dark",
|
||||||
|
h2 = "yellow_dark",
|
||||||
|
h3 = "green_dark",
|
||||||
|
h4 = "aqua_dark",
|
||||||
|
h5 = "blue_dark",
|
||||||
|
h6 = "purple_dark",
|
||||||
|
},
|
||||||
|
})
|
||||||
+13
-13
@@ -4,23 +4,23 @@ harpoon:setup()
|
|||||||
|
|
||||||
local conf = require("telescope.config").values
|
local conf = require("telescope.config").values
|
||||||
local function toggle_telescope(harpoon_files)
|
local function toggle_telescope(harpoon_files)
|
||||||
local file_paths = {}
|
local file_paths = {}
|
||||||
for _, item in ipairs(harpoon_files.items) do
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
table.insert(file_paths, item.value)
|
table.insert(file_paths, item.value)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("telescope.pickers").new({}, {
|
require("telescope.pickers").new({}, {
|
||||||
prompt_title = "Harpoon",
|
prompt_title = "Harpoon",
|
||||||
finder = require("telescope.finders").new_table({
|
finder = require("telescope.finders").new_table({
|
||||||
results = file_paths,
|
results = file_paths,
|
||||||
}),
|
}),
|
||||||
previewer = conf.file_previewer({}),
|
previewer = conf.file_previewer({}),
|
||||||
sorter = conf.generic_sorter({}),
|
sorter = conf.generic_sorter({}),
|
||||||
}):find()
|
}):find()
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
|
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
|
||||||
{ desc = "Open harpoon window" })
|
{ desc = "Open harpoon window" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
local highlight = {
|
local highlight = {
|
||||||
"RainbowRed",
|
"RainbowRed",
|
||||||
"RainbowYellow",
|
"RainbowYellow",
|
||||||
"RainbowBlue",
|
"RainbowBlue",
|
||||||
"RainbowOrange",
|
"RainbowOrange",
|
||||||
"RainbowGreen",
|
"RainbowGreen",
|
||||||
"RainbowViolet",
|
"RainbowViolet",
|
||||||
"RainbowCyan",
|
"RainbowCyan",
|
||||||
}
|
}
|
||||||
local hooks = require "ibl.hooks"
|
local hooks = require "ibl.hooks"
|
||||||
-- create the highlight groups in the highlight setup hook, so they are reset
|
-- create the highlight groups in the highlight setup hook, so they are reset
|
||||||
-- every time the colorscheme changes
|
-- every time the colorscheme changes
|
||||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||||
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
vim.g.rainbow_delimiters = { highlight = highlight }
|
vim.g.rainbow_delimiters = { highlight = highlight }
|
||||||
require("ibl").setup {
|
require("ibl").setup {
|
||||||
indent = { char = "▏" },
|
indent = { char = "▏" },
|
||||||
scope = { highlight = highlight }
|
scope = { highlight = highlight }
|
||||||
}
|
}
|
||||||
|
|
||||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
|
|||||||
+20
-20
@@ -1,17 +1,17 @@
|
|||||||
-- Bootstrap lazy.nvim
|
-- bootstrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
@@ -19,12 +19,12 @@ vim.g.mapleader = " "
|
|||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
-- colorscheme that will be used when installing plugins.
|
-- colorscheme that will be used when installing plugins.
|
||||||
install = { colorscheme = { "onedark" } },
|
install = { colorscheme = { "onedark" } },
|
||||||
-- automatically check for plugin updates
|
-- automatically check for plugin updates
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
require("lazydev").setup({
|
require("lazydev").setup({
|
||||||
library = {
|
library = {
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" }},
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" }},
|
||||||
"LazyVim",
|
"LazyVim",
|
||||||
},
|
},
|
||||||
enabled = function(root_dir)
|
enabled = function(root_dir)
|
||||||
return vim.g.lazydev_enabled == nil and true or vim.g.lazydev_enabled
|
return vim.g.lazydev_enabled == nil and true or vim.g.lazydev_enabled
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
+201
-185
@@ -1,220 +1,236 @@
|
|||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local cmp_lsp = require("cmp_nvim_lsp")
|
local cmp_lsp = require("cmp_nvim_lsp")
|
||||||
local capabilities = vim.tbl_deep_extend(
|
local capabilities = vim.tbl_deep_extend(
|
||||||
"force",
|
"force",
|
||||||
{},
|
{},
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
cmp_lsp.default_capabilities()
|
cmp_lsp.default_capabilities()
|
||||||
)
|
)
|
||||||
|
|
||||||
local cmp_kinds = {
|
local cmp_kinds = {
|
||||||
Text = ' ',
|
Text = ' ',
|
||||||
Method = ' ',
|
Method = ' ',
|
||||||
Function = ' ',
|
Function = ' ',
|
||||||
Constructor = ' ',
|
Constructor = ' ',
|
||||||
Field = ' ',
|
Field = ' ',
|
||||||
Variable = ' ',
|
Variable = ' ',
|
||||||
Class = ' ',
|
Class = ' ',
|
||||||
Interface = ' ',
|
Interface = ' ',
|
||||||
Module = ' ',
|
Module = ' ',
|
||||||
Property = ' ',
|
Property = ' ',
|
||||||
Unit = ' ',
|
Unit = ' ',
|
||||||
Value = ' ',
|
Value = ' ',
|
||||||
Enum = ' ',
|
Enum = ' ',
|
||||||
Keyword = ' ',
|
Keyword = ' ',
|
||||||
Snippet = ' ',
|
Snippet = ' ',
|
||||||
Color = ' ',
|
Color = ' ',
|
||||||
File = ' ',
|
File = ' ',
|
||||||
Reference = ' ',
|
Reference = ' ',
|
||||||
Folder = ' ',
|
Folder = ' ',
|
||||||
EnumMember = ' ',
|
EnumMember = ' ',
|
||||||
Constant = ' ',
|
Constant = ' ',
|
||||||
Struct = ' ',
|
Struct = ' ',
|
||||||
Event = ' ',
|
Event = ' ',
|
||||||
Operator = ' ',
|
Operator = ' ',
|
||||||
TypeParameter = ' ',
|
TypeParameter = ' ',
|
||||||
}
|
}
|
||||||
|
|
||||||
require("fidget").setup({})
|
require("fidget").setup({})
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
automatic_enable = true,
|
automatic_enable = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"gopls",
|
"gopls",
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
require("lspconfig")[server_name].setup {
|
require("lspconfig")[server_name].setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["css-lsp"] = function()
|
["tailwindcss"] = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig.cssls.setup {
|
lspconfig.tailwindcss.setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
zls = function()
|
["css-lsp"] = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig.zls.setup({
|
lspconfig.cssls.setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
|
}
|
||||||
settings = {
|
end,
|
||||||
zls = {
|
|
||||||
enable_inlay_hints = true,
|
|
||||||
enable_snippets = true,
|
|
||||||
warn_style = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.g.zig_fmt_parse_errors = 0
|
|
||||||
vim.g.zig_fmt_autosave = 0
|
|
||||||
|
|
||||||
end,
|
zls = function()
|
||||||
["lua_ls"] = function()
|
local lspconfig = require("lspconfig")
|
||||||
local lspconfig = require("lspconfig")
|
lspconfig.zls.setup({
|
||||||
lspconfig.lua_ls.setup {
|
capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"),
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
zls = {
|
||||||
runtime = { version = "Lua 5.1" },
|
enable_inlay_hints = true,
|
||||||
diagnostics = {
|
enable_snippets = true,
|
||||||
globals = { "bit", "vim", "it", "describe", "before_each", "after_each" },
|
warn_style = true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
})
|
||||||
}
|
vim.g.zig_fmt_parse_errors = 0
|
||||||
end,
|
vim.g.zig_fmt_autosave = 0
|
||||||
}
|
|
||||||
|
end,
|
||||||
|
["lua_ls"] = function()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
lspconfig.lua_ls.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = { version = "Lua 5.1" },
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "bit", "vim", "it", "describe", "before_each", "after_each" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
formatting = {
|
preselect = 'None',
|
||||||
fields = { 'kind', 'abbr' },
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
fields = { 'kind', 'abbr' },
|
||||||
vim_item.kind = cmp_kinds[vim_item.kind] or ''
|
format = function(entry, vim_item)
|
||||||
if entry.completion_item.detail then
|
vim_item.kind = cmp_kinds[vim_item.kind] or ''
|
||||||
vim_item.menu = entry.completion_item.detail
|
if entry.completion_item.detail then
|
||||||
end
|
vim_item.menu = entry.completion_item.detail
|
||||||
return vim_item
|
end
|
||||||
end,
|
return vim_item
|
||||||
},
|
end,
|
||||||
completion = { completeopt = "menu,menuone" },
|
},
|
||||||
snippet = {
|
completion = { completeopt = "menu,menuone" },
|
||||||
expand = function(args)
|
snippet = {
|
||||||
require("luasnip").lsp_expand(args.body)
|
expand = function(args)
|
||||||
end,
|
require("luasnip").lsp_expand(args.body)
|
||||||
},
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
["<CR>"] = cmp.mapping.confirm {
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
select = true,
|
select = true,
|
||||||
},
|
},
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif require("luasnip").expand_or_jumpable() then
|
elseif require("luasnip").expand_or_jumpable() then
|
||||||
require("luasnip").expand_or_jump()
|
require("luasnip").expand_or_jump()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif require("luasnip").jumpable(-1) then
|
elseif require("luasnip").jumpable(-1) then
|
||||||
require("luasnip").jump(-1)
|
require("luasnip").jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
},
|
},
|
||||||
|
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "nvim_lua" },
|
{ name = "nvim_lua" },
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
-- update_in_insert = true,
|
-- update_in_insert = true,
|
||||||
virtual_text = true,
|
virtual_text = false,
|
||||||
float = {
|
virtual_lines = false,
|
||||||
focusable = false,
|
signs = true,
|
||||||
style = "minimal",
|
underline = true,
|
||||||
border = "rounded",
|
float = {
|
||||||
source = "always",
|
focusable = false,
|
||||||
header = "",
|
style = "minimal",
|
||||||
prefix = "",
|
border = "rounded",
|
||||||
},
|
source = true,
|
||||||
|
header = "",
|
||||||
|
prefix = "",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspconfig = vim.lsp.config
|
local lspconfig = vim.lsp.config
|
||||||
|
|
||||||
lspconfig("texlab", {
|
lspconfig("texlab", {
|
||||||
cmd = { "texlab" },
|
cmd = { "texlab" },
|
||||||
filetypes = { "tex", "bib", "plaintex" },
|
filetypes = { "tex", "bib", "plaintex" },
|
||||||
root_markers = { ".git", ".latexmkrc", "latexmkrc", ".texlabroot", "texlabroot", "Tectonic.toml" },
|
root_markers = { ".git", ".latexmkrc", "latexmkrc", ".texlabroot", "texlabroot", "Tectonic.toml" },
|
||||||
settings = {
|
settings = {
|
||||||
texlab = {
|
texlab = {
|
||||||
rootDirectory = nil,
|
rootDirectory = nil,
|
||||||
build = {
|
build = {
|
||||||
executable = "latexmk",
|
executable = "latexmk",
|
||||||
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" },
|
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" },
|
||||||
onSave = true,
|
onSave = true,
|
||||||
forwardSearchAfter = true,
|
forwardSearchAfter = true,
|
||||||
},
|
},
|
||||||
forwardSearch = {
|
forwardSearch = {
|
||||||
executable = "zathura",
|
executable = "zathura",
|
||||||
args = {
|
args = {
|
||||||
"--synctex-editor-command",
|
"--synctex-editor-command",
|
||||||
[[ nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
[[ nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername,
|
||||||
"--synctex-forward",
|
"--synctex-forward",
|
||||||
"%l:1:%f",
|
"%l:1:%f",
|
||||||
"%p",
|
"%p",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
chktex = {
|
chktex = {
|
||||||
onEdit = false,
|
onEdit = false,
|
||||||
onOpenAndSave = true,
|
onOpenAndSave = true,
|
||||||
},
|
},
|
||||||
diagnosticsDelay = 300,
|
diagnosticsDelay = 300,
|
||||||
latexFormatter = "latexindent",
|
latexFormatter = "latexindent",
|
||||||
latexindent = {
|
latexindent = {
|
||||||
['local'] = nil,
|
['local'] = nil,
|
||||||
modifyLineBreaks = false,
|
modifyLineBreaks = false,
|
||||||
},
|
},
|
||||||
bibtexFormatter = "texlab",
|
bibtexFormatter = "texlab",
|
||||||
formatterLineLength = 80,
|
formatterLineLength = 80,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
lspconfig("qmlls", {
|
||||||
|
cmd = { "qmlls6" },
|
||||||
})
|
})
|
||||||
|
|
||||||
local lspenable = vim.lsp.enable
|
local lspenable = vim.lsp.enable
|
||||||
local servers = {
|
local servers = {
|
||||||
-- "html",
|
"html",
|
||||||
"bashls",
|
"bashls",
|
||||||
"pyright",
|
"pyright",
|
||||||
-- "ts_ls",
|
"ts_ls",
|
||||||
-- "texlab",
|
"texlab",
|
||||||
-- "jdtls",
|
"sourcekit",
|
||||||
-- "sourcekit",
|
"qmlls",
|
||||||
|
"tailwindcss",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
lspenable(server)
|
lspenable(server)
|
||||||
end
|
end
|
||||||
|
|||||||
+144
-143
@@ -1,170 +1,171 @@
|
|||||||
local fn = vim.fn
|
local fn = vim.fn
|
||||||
|
|
||||||
local get_active_lsp = function()
|
local get_active_lsp = function()
|
||||||
local msg = "🚫"
|
local msg = ""
|
||||||
local buf_ft = vim.api.nvim_get_option_value("filetype", {})
|
local buf_ft = vim.api.nvim_get_option_value("filetype", {})
|
||||||
local clients = vim.lsp.get_clients { bufnr = 0 }
|
local clients = vim.lsp.get_clients { bufnr = 0 }
|
||||||
if next(clients) == nil then
|
if next(clients) == nil then
|
||||||
return msg
|
return msg
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, client in ipairs(clients) do
|
for _, client in ipairs(clients) do
|
||||||
---@diagnostic disable-next-line: undefined-field
|
---@diagnostic disable-next-line: undefined-field
|
||||||
local filetypes = client.config.filetypes
|
local filetypes = client.config.filetypes
|
||||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
return client.name
|
return client.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return msg
|
return msg
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spell()
|
local function spell()
|
||||||
if vim.o.spell then
|
if vim.o.spell then
|
||||||
return string.format("[SPELL]")
|
return string.format("[SPELL]")
|
||||||
end
|
end
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
--- show indicator for Chinese IME
|
--- show indicator for Chinese IME
|
||||||
local function ime_state()
|
local function ime_state()
|
||||||
if vim.g.is_mac then
|
if vim.g.is_mac then
|
||||||
local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
|
local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
|
||||||
local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
|
local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
|
||||||
if res ~= -1 then
|
if res ~= -1 then
|
||||||
return "[CN]"
|
return "[CN]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local diff = function()
|
local diff = function()
|
||||||
local git_status = vim.b.gitsigns_status_dict
|
local git_status = vim.b.gitsigns_status_dict
|
||||||
if git_status == nil then
|
if git_status == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local modify_num = git_status.changed
|
local modify_num = git_status.changed
|
||||||
local remove_num = git_status.removed
|
local remove_num = git_status.removed
|
||||||
local add_num = git_status.added
|
local add_num = git_status.added
|
||||||
|
|
||||||
local info = { added = add_num, modified = modify_num, removed = remove_num }
|
local info = { added = add_num, modified = modify_num, removed = remove_num }
|
||||||
-- vim.print(info)
|
-- vim.print(info)
|
||||||
return info
|
return info
|
||||||
end
|
end
|
||||||
|
|
||||||
local virtual_env = function()
|
local virtual_env = function()
|
||||||
-- only show virtual env for Python
|
-- only show virtual env for Python
|
||||||
if vim.bo.filetype ~= "python" then
|
if vim.bo.filetype ~= "python" then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local conda_env = os.getenv("CONDA_DEFAULT_ENV")
|
local conda_env = os.getenv("CONDA_DEFAULT_ENV")
|
||||||
local venv_path = os.getenv("VIRTUAL_ENV")
|
local venv_path = os.getenv("VIRTUAL_ENV")
|
||||||
|
|
||||||
if venv_path == nil then
|
if venv_path == nil then
|
||||||
if conda_env == nil then
|
if conda_env == nil then
|
||||||
return ""
|
return ""
|
||||||
else
|
else
|
||||||
return string.format(" %s (conda)", conda_env)
|
return string.format(" %s (conda)", conda_env)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local venv_name = vim.fn.fnamemodify(venv_path, ":t")
|
local venv_name = vim.fn.fnamemodify(venv_path, ":t")
|
||||||
return string.format(" %s (venv)", venv_name)
|
return string.format(" %s (venv)", venv_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require("lualine").setup {
|
require("lualine").setup {
|
||||||
options = {
|
laststatus = 0,
|
||||||
icons_enabled = true,
|
options = {
|
||||||
theme = "auto",
|
icons_enabled = true,
|
||||||
globalstatus = true,
|
theme = "auto",
|
||||||
component_separators = '',
|
globalstatus = true,
|
||||||
section_separators = { left = '', right = '' },
|
component_separators = '',
|
||||||
disabled_filetypes = {},
|
section_separators = { left = '', right = '' },
|
||||||
always_divide_middle = true,
|
disabled_filetypes = {},
|
||||||
},
|
always_divide_middle = true,
|
||||||
sections = {
|
},
|
||||||
lualine_a = {
|
sections = {
|
||||||
{
|
lualine_a = {
|
||||||
"mode",
|
{
|
||||||
},
|
"mode",
|
||||||
},
|
},
|
||||||
lualine_b = {
|
},
|
||||||
{
|
lualine_b = {
|
||||||
"branch",
|
{
|
||||||
fmt = function(name, _)
|
"branch",
|
||||||
-- truncate branch name in case the name is too long
|
fmt = function(name, _)
|
||||||
return string.sub(name, 1, 20)
|
-- truncate branch name in case the name is too long
|
||||||
end,
|
return string.sub(name, 1, 20)
|
||||||
color = { gui = "italic,bold" },
|
end,
|
||||||
separator = { right = "" },
|
color = { gui = "italic,bold" },
|
||||||
},
|
separator = { right = "" },
|
||||||
{
|
},
|
||||||
virtual_env,
|
{
|
||||||
color = { fg = "black", bg = "#F1CA81" },
|
virtual_env,
|
||||||
},
|
color = { fg = "black", bg = "#F1CA81" },
|
||||||
},
|
},
|
||||||
lualine_c = {
|
},
|
||||||
{
|
lualine_c = {
|
||||||
"filename",
|
{
|
||||||
symbols = {
|
"filename",
|
||||||
readonly = "[🔒]",
|
symbols = {
|
||||||
},
|
readonly = "[]",
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
"diff",
|
{
|
||||||
source = diff,
|
"diff",
|
||||||
},
|
source = diff,
|
||||||
{
|
},
|
||||||
"%S",
|
{
|
||||||
color = { gui = "bold", fg = "cyan" },
|
"%S",
|
||||||
},
|
color = { gui = "bold", fg = "cyan" },
|
||||||
{
|
},
|
||||||
spell,
|
{
|
||||||
color = { fg = "black", bg = "#a7c080" },
|
spell,
|
||||||
},
|
color = { fg = "black", bg = "#a7c080" },
|
||||||
},
|
},
|
||||||
lualine_x = {
|
},
|
||||||
{
|
lualine_x = {
|
||||||
ime_state,
|
{
|
||||||
color = { fg = "black", bg = "#f46868" },
|
ime_state,
|
||||||
},
|
color = { fg = "black", bg = "#f46868" },
|
||||||
{
|
},
|
||||||
get_active_lsp,
|
{
|
||||||
icon = " LSP:",
|
get_active_lsp,
|
||||||
},
|
icon = " LSP:",
|
||||||
{
|
},
|
||||||
"diagnostics",
|
{
|
||||||
sources = { "nvim_diagnostic" },
|
"diagnostics",
|
||||||
symbols = { error = "🆇 ", warn = "⚠️ ", info = "ℹ️ ", hint = " " },
|
sources = { "nvim_diagnostic" },
|
||||||
},
|
symbols = { error = " ", warn = " ", info = " ", hint = " " },
|
||||||
},
|
},
|
||||||
lualine_y = {
|
},
|
||||||
{ "encoding", fmt = string.upper },
|
lualine_y = {
|
||||||
{
|
{ "encoding", fmt = string.upper },
|
||||||
"fileformat",
|
{
|
||||||
symbols = {
|
"fileformat",
|
||||||
unix = "",
|
symbols = {
|
||||||
dos = "",
|
unix = "",
|
||||||
mac = "",
|
dos = "",
|
||||||
},
|
mac = "",
|
||||||
},
|
},
|
||||||
"filetype",
|
},
|
||||||
},
|
"filetype",
|
||||||
lualine_z = {
|
},
|
||||||
"progress",
|
lualine_z = {
|
||||||
},
|
"progress",
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
},
|
||||||
lualine_a = {},
|
inactive_sections = {
|
||||||
lualine_b = {},
|
lualine_a = {},
|
||||||
lualine_c = { "filename" },
|
lualine_b = {},
|
||||||
lualine_x = { "location" },
|
lualine_c = { "filename" },
|
||||||
lualine_y = {},
|
lualine_x = { "location" },
|
||||||
lualine_z = {},
|
lualine_y = {},
|
||||||
},
|
lualine_z = {},
|
||||||
tabline = {},
|
},
|
||||||
extensions = { "quickfix", "fugitive", "nvim-tree" },
|
tabline = {},
|
||||||
|
extensions = { "quickfix", "fugitive", "nvim-tree" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
content = {
|
||||||
|
active = nil,
|
||||||
|
inactive = nil,
|
||||||
|
},
|
||||||
|
use_icons = true,
|
||||||
|
}
|
||||||
+15
-15
@@ -1,17 +1,17 @@
|
|||||||
require("modicator").setup({
|
require("modicator").setup({
|
||||||
show_warnings = true,
|
show_warnings = true,
|
||||||
highlights = {
|
highlights = {
|
||||||
defaults = {
|
defaults = {
|
||||||
bold = false,
|
bold = false,
|
||||||
italic = false,
|
italic = false,
|
||||||
},
|
},
|
||||||
use_cursorline_background = true,
|
use_cursorline_background = true,
|
||||||
},
|
},
|
||||||
integration = {
|
integration = {
|
||||||
lualine = {
|
lualine = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
mode_section = nil,
|
mode_section = nil,
|
||||||
highlight = 'bg',
|
highlight = 'bg',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
require("mini.splitjoin").setup({
|
||||||
|
mappings = {
|
||||||
|
toggle = "gS",
|
||||||
|
},
|
||||||
|
|
||||||
|
detect = {
|
||||||
|
brackets = { '%b()', '%b{}', '%b[]' },
|
||||||
|
|
||||||
|
separator = '[,;]',
|
||||||
|
},
|
||||||
|
})
|
||||||
+27
-27
@@ -1,29 +1,29 @@
|
|||||||
require("noice").setup({
|
require("noice").setup({
|
||||||
lsp = {
|
lsp = {
|
||||||
override = {
|
override = {
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
["cmp.entry.get_documentation"] = true,
|
["cmp.entry.get_documentation"] = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
presets = {
|
presets = {
|
||||||
bottom_search = true,
|
bottom_search = true,
|
||||||
command_palette = true,
|
command_palette = true,
|
||||||
long_message_to_split = true,
|
long_message_to_split = true,
|
||||||
inc_rename = false,
|
inc_rename = false,
|
||||||
lsp_doc_border = false,
|
lsp_doc_border = false,
|
||||||
},
|
},
|
||||||
views = {
|
views = {
|
||||||
popupmenu = {
|
popupmenu = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
backend = "nui",
|
backend = "nui",
|
||||||
win_options = {
|
win_options = {
|
||||||
winblend = 0.5,
|
winblend = 0.5,
|
||||||
},
|
},
|
||||||
border = {
|
border = {
|
||||||
style = "shadow",
|
style = "shadow",
|
||||||
padding = { 1, 2 },
|
padding = { 1, 2 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ vim.notify = require('notify')
|
|||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
|
||||||
require('notify').setup({
|
require('notify').setup({
|
||||||
render = "wrapped-default",
|
render = "wrapped-default",
|
||||||
timeout = 6000,
|
timeout = 6000,
|
||||||
max_width = 50,
|
max_width = 50,
|
||||||
minimum_width = 50,
|
minimum_width = 50,
|
||||||
@@ -15,10 +15,10 @@ require('notify').setup({
|
|||||||
DEBUG = "",
|
DEBUG = "",
|
||||||
TRACE = "✎",
|
TRACE = "✎",
|
||||||
},
|
},
|
||||||
on_open = function(win)
|
on_open = function(win)
|
||||||
-- vim.api.nvim_win_set_option(win, 'wrap', true)
|
-- vim.api.nvim_win_set_option(win, 'wrap', true)
|
||||||
vim.api.nvim_win_set_option(win, 'breakat', ' ')
|
vim.api.nvim_win_set_option(win, 'breakat', ' ')
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Utility functions shared between progress reports for LSP and DAP
|
-- Utility functions shared between progress reports for LSP and DAP
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
local popup = require('nui.popup')
|
local popup = require('nui.popup')
|
||||||
|
|
||||||
local Popup = popup({
|
local Popup = popup({
|
||||||
border = {
|
border = {
|
||||||
style = "shadow",
|
style = "shadow",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
require('refactoring').setup({
|
||||||
|
prompt_func_return_type = {
|
||||||
|
go = true,
|
||||||
|
java = true,
|
||||||
|
|
||||||
|
cpp = true,
|
||||||
|
c = true,
|
||||||
|
h = true,
|
||||||
|
hpp = true,
|
||||||
|
cxx = true,
|
||||||
|
},
|
||||||
|
prompt_func_param_type = {
|
||||||
|
go = true,
|
||||||
|
java = true,
|
||||||
|
|
||||||
|
cpp = true,
|
||||||
|
c = true,
|
||||||
|
h = true,
|
||||||
|
hpp = true,
|
||||||
|
cxx = true,
|
||||||
|
},
|
||||||
|
printf_statements = {},
|
||||||
|
print_var_statements = {},
|
||||||
|
show_success_message = true, -- shows a message with information about the refactor on success
|
||||||
|
-- i.e. [Refactor] Inlined 3 variable occurrences
|
||||||
|
})
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
require("region-folding").setup({
|
require("region-folding").setup({
|
||||||
region_text = { start = "<think>", ending = "</think>" },
|
region_text = { start = "<think>", ending = "</think>" },
|
||||||
fold_indicator = "▼",
|
fold_indicator = "▼",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = { enabled = true },
|
||||||
|
explorer = { enabled = true },
|
||||||
|
indent = {
|
||||||
|
enabled = true,
|
||||||
|
scope = {
|
||||||
|
enabled = true,
|
||||||
|
underline = false,
|
||||||
|
},
|
||||||
|
chunk = {
|
||||||
|
enabled = false,
|
||||||
|
char = {
|
||||||
|
corner_top = "╭",
|
||||||
|
corner_bottom = "╰",
|
||||||
|
vertical = "│",
|
||||||
|
arrow = "╼",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
input = { enabled = true },
|
||||||
|
picker = {
|
||||||
|
enabled = true,
|
||||||
|
hidden = true,
|
||||||
|
ignored = true,
|
||||||
|
},
|
||||||
|
image = {
|
||||||
|
enabled = true,
|
||||||
|
formats = {
|
||||||
|
"png",
|
||||||
|
"jpg",
|
||||||
|
"jpeg",
|
||||||
|
"gif",
|
||||||
|
"bmp",
|
||||||
|
"webp",
|
||||||
|
"tiff",
|
||||||
|
"heic",
|
||||||
|
"avif",
|
||||||
|
"mp4",
|
||||||
|
"mov",
|
||||||
|
"avi",
|
||||||
|
"mkv",
|
||||||
|
"webm",
|
||||||
|
"pdf",
|
||||||
|
"icns",
|
||||||
|
},
|
||||||
|
doc = {
|
||||||
|
enabled = true,
|
||||||
|
inline = true,
|
||||||
|
float = true,
|
||||||
|
max_width = 80,
|
||||||
|
max_height = 80,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
notifier = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
scroll = { enabled = true },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
words = { enabled = true },
|
||||||
|
terminal = {
|
||||||
|
enabled = true,
|
||||||
|
win = { style = "terminal" },
|
||||||
|
},
|
||||||
|
styles = {
|
||||||
|
terminal = {
|
||||||
|
keys = {
|
||||||
|
term_normal = {
|
||||||
|
"<c-q>",
|
||||||
|
function()
|
||||||
|
Snacks.terminal.toggle()
|
||||||
|
end,
|
||||||
|
mode = "t"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gitbrowse = {
|
||||||
|
enabled = true,
|
||||||
|
notify = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1 +1,7 @@
|
|||||||
require("telescope").setup ({})
|
require("telescope").setup ({
|
||||||
|
pickers = {
|
||||||
|
colorscheme = {
|
||||||
|
enable_preview = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
+10
-10
@@ -1,15 +1,15 @@
|
|||||||
local M = {}
|
local i = {}
|
||||||
|
|
||||||
function M.foldexpr()
|
function M.foldexpr()
|
||||||
local lnum = vim.v.lnum
|
local lnum = vim.v.lnum
|
||||||
local line = vim.fn.getline( lnum )
|
local line = vim.fn.getline( lnum )
|
||||||
if line:find( "<think>", 1, true ) then
|
if line:find( "<think>", 1, true ) then
|
||||||
return "a1"
|
return "a1"
|
||||||
elseif line:find( "</think>", 1, true ) then
|
elseif line:find( "</think>", 1, true ) then
|
||||||
return "s1"
|
return "s1"
|
||||||
else
|
else
|
||||||
return "="
|
return "="
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
-- Lua
|
-- lua
|
||||||
require('onedarkpro').setup({
|
require('onedarkpro').setup({
|
||||||
highlights = {
|
highlights = {
|
||||||
Comment = { italic = true },
|
Comment = { italic = true },
|
||||||
Directory = { bold = false },
|
Directory = { bold = false },
|
||||||
ErrorMsg = { italic = true },
|
ErrorMsg = { italic = true },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+19
-17
@@ -1,19 +1,21 @@
|
|||||||
require("tmux").setup({
|
require("tmux").setup({
|
||||||
copy_sync = {
|
copy_sync = {
|
||||||
enable = true,
|
enable = true,
|
||||||
redirect_to_clipboard = true,
|
redirect_to_clipboard = true,
|
||||||
sync_clipboard = true,
|
sync_clipboard = true,
|
||||||
sync_registers = true,
|
sync_registers = true,
|
||||||
},
|
},
|
||||||
navigation = {
|
navigation = {
|
||||||
cycle_navigation = true,
|
cycle_navigation = true,
|
||||||
enable_default_keybindings = false,
|
enable_default_keybindings = false,
|
||||||
},
|
},
|
||||||
resize = {
|
resize = {
|
||||||
enable_default_keybindings = false,
|
enable_default_keybindings = false,
|
||||||
},
|
resize_step_x = 5,
|
||||||
swap = {
|
resize_step_y = 5,
|
||||||
cycle_navigation = true,
|
},
|
||||||
enable_default_keybindings = false,
|
swap = {
|
||||||
}
|
cycle_navigation = false,
|
||||||
|
enable_default_keybindings = false,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
ensure_installed = "all",
|
ensure_installed = "all",
|
||||||
sync_install = true,
|
ignore_install = { "ipkg" },
|
||||||
auto_install = true,
|
sync_install = true,
|
||||||
highlight = {
|
auto_install = true,
|
||||||
enable = true,
|
highlight = {
|
||||||
additional_vim_regex_highlighting = false,
|
enable = true,
|
||||||
},
|
additional_vim_regex_highlighting = false,
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-17
@@ -1,19 +1,19 @@
|
|||||||
require('undotree').setup({
|
require('undotree').setup({
|
||||||
float_diff = true,
|
float_diff = true,
|
||||||
layout = "left_bottom",
|
layout = "left_bottom",
|
||||||
position = "left",
|
position = "left",
|
||||||
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
||||||
window = {
|
window = {
|
||||||
winblend = 30,
|
winblend = 30,
|
||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
['j'] = "move_next",
|
['j'] = "move_next",
|
||||||
['k'] = "move_prev",
|
['k'] = "move_prev",
|
||||||
['gj'] = "move2parent",
|
['gj'] = "move2parent",
|
||||||
['J'] = "move_change_next",
|
['J'] = "move_change_next",
|
||||||
['K'] = "move_change_prev",
|
['K'] = "move_change_prev",
|
||||||
['<cr>'] = "action_enter",
|
['<cr>'] = "action_enter",
|
||||||
['p'] = "enter_diffbuf",
|
['p'] = "enter_diffbuf",
|
||||||
['q'] = "quit",
|
['q'] = "quit",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+23
-5
@@ -10,10 +10,20 @@ map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
|
|||||||
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
|
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
|
||||||
|
|
||||||
-- Alt + Arrow Key to change buffer
|
-- Alt + Arrow Key to change buffer
|
||||||
map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" })
|
-- map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" })
|
||||||
map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" })
|
-- map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" })
|
||||||
map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" })
|
-- map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" })
|
||||||
map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" })
|
-- map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" })
|
||||||
|
|
||||||
|
map("n", "<A-Left>", "<cmd>lua require('tmux').move_left()<CR>", { desc = "Move to left split" })
|
||||||
|
map("n", "<A-Down>", "<cmd>lua require('tmux').move_bottom()<CR>", { desc = "Move to bottom split" })
|
||||||
|
map("n", "<A-Up>", "<cmd>lua require('tmux').move_top()<CR>", { desc = "Move to top split" })
|
||||||
|
map("n", "<A-Right>", "<cmd>lua require('tmux').move_right()<CR>", { desc = "Move to right split" })
|
||||||
|
|
||||||
|
map("n", "<C-Left>", "<cmd>lua require('tmux').resize_left()<CR>", { desc = "Move to left split" })
|
||||||
|
map("n", "<C-Down>", "<cmd>lua require('tmux').resize_bottom()<CR>", { desc = "Move to bottom split" })
|
||||||
|
map("n", "<C-Up>", "<cmd>lua require('tmux').resize_top()<CR>", { desc = "Move to top split" })
|
||||||
|
map("n", "<C-Right>", "<cmd>lua require('tmux').resize_right()<CR>", { desc = "Move to right split" })
|
||||||
|
|
||||||
-- Copilot Chat buffer
|
-- Copilot Chat buffer
|
||||||
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||||
@@ -55,7 +65,15 @@ map("i", "<C-c>", "<Esc>")
|
|||||||
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
|
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
|
||||||
|
|
||||||
map("n", "<leader><leader>", function()
|
map("n", "<leader><leader>", function()
|
||||||
vim.cmd("so")
|
vim.cmd("so")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
|
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
|
||||||
|
|
||||||
|
map("n", "<leader>fm", "<cmd>TailwindConcealToggle<CR>", { desc = "Toggle Tailwind Conceal" })
|
||||||
|
|
||||||
|
-- Terminal
|
||||||
|
map("n", "<C-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Terminal" })
|
||||||
|
|
||||||
|
-- Gitbrowse
|
||||||
|
map("n", "<leader>gb", function() Snacks.gitbrowse.open() end )
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.load_modules()
|
||||||
|
local modules_path = vim.fn.stdpath("config") .. "/lua/config/modules"
|
||||||
|
local modules = vim.fn.globpath(modules_path, "*.lua", false, true)
|
||||||
|
|
||||||
|
for _, module_file in ipairs(modules) do
|
||||||
|
local module_name = vim.fn.fnamemodify(module_file, ":t:r")
|
||||||
|
|
||||||
|
local ok, err = pcall(require, "config.modules." .. module_name)
|
||||||
|
if not ok then
|
||||||
|
vim.notify("Failed to load module: " .. module_name .. "\n" .. err, vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
+12
-8
@@ -3,8 +3,12 @@ vim.opt.relativenumber = true
|
|||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = false
|
||||||
vim.opt.smartindent = true
|
vim.opt.smartindent = false
|
||||||
|
|
||||||
|
vim.o.list = true
|
||||||
|
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
|
||||||
|
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = true
|
||||||
vim.opt.linebreak = true
|
vim.opt.linebreak = true
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
@@ -21,13 +25,7 @@ vim.opt.updatetime = 50
|
|||||||
vim.opt.colorcolumn = "80"
|
vim.opt.colorcolumn = "80"
|
||||||
vim.opt.textwidth = 80
|
vim.opt.textwidth = 80
|
||||||
vim.opt.formatoptions = "rqnj"
|
vim.opt.formatoptions = "rqnj"
|
||||||
-- vim.opt.foldmethod = "expr"
|
|
||||||
-- vim.opt.foldexpr = "v:lua.require('config.testfold').foldexpr()"
|
|
||||||
-- vim.opt.foldenable = true
|
|
||||||
-- vim.opt.foldlevel = 0
|
|
||||||
-- vim.opt.foldlevelstart = 0
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
vim.o.laststatus = 3
|
|
||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = "unnamedplus"
|
||||||
vim.o.cursorline = true
|
vim.o.cursorline = true
|
||||||
vim.o.cursorlineopt = "number"
|
vim.o.cursorlineopt = "number"
|
||||||
@@ -36,6 +34,7 @@ vim.o.ignorecase = true
|
|||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
vim.o.mouse = "a"
|
vim.o.mouse = "a"
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
|
vim.o.termguicolors = true
|
||||||
vim.o.numberwidth = 3
|
vim.o.numberwidth = 3
|
||||||
vim.o.ruler = false
|
vim.o.ruler = false
|
||||||
vim.o.showmode = false
|
vim.o.showmode = false
|
||||||
@@ -52,3 +51,8 @@ local is_windows = vim.fn.has "win32" ~= 0
|
|||||||
local sep = is_windows and "\\" or "/"
|
local sep = is_windows and "\\" or "/"
|
||||||
local delim = is_windows and ";" or ":"
|
local delim = is_windows and ";" or ":"
|
||||||
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
|
vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. delim .. vim.env.PATH
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
|
||||||
|
|
||||||
|
-- vim-tpipeline
|
||||||
|
vim.g.tpipeline_restore = 1
|
||||||
|
|||||||
+281
-213
@@ -1,215 +1,283 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-mini/mini.nvim",
|
||||||
config = function()
|
version = false,
|
||||||
require("config.treesitter")
|
|
||||||
end,
|
modules = function()
|
||||||
},
|
require("config.mini-modules")
|
||||||
{
|
end,
|
||||||
"rmagatti/auto-session",
|
},
|
||||||
config = function()
|
{
|
||||||
require("config.autosession")
|
"nvim-treesitter/nvim-treesitter",
|
||||||
end,
|
config = function()
|
||||||
},
|
require("config.treesitter")
|
||||||
{
|
end,
|
||||||
"olimorris/onedarkpro.nvim",
|
},
|
||||||
priority = 1000,
|
{
|
||||||
config = function()
|
"sainnhe/edge",
|
||||||
require("config.themelight")
|
lazy = false,
|
||||||
end,
|
priority = 1000,
|
||||||
},
|
config = function()
|
||||||
{
|
vim.g.edge_enable_italic = 1
|
||||||
"nvim-telescope/telescope.nvim",
|
vim.g.edge_style = "default"
|
||||||
dependencies = {
|
vim.g.edge_menu_selection_background = "purple"
|
||||||
"nvim-lua/plenary.nvim",
|
end,
|
||||||
},
|
},
|
||||||
config = function()
|
{
|
||||||
require("config.telescope")
|
"rmagatti/auto-session",
|
||||||
end,
|
config = function()
|
||||||
},
|
require("config.autosession")
|
||||||
{
|
end,
|
||||||
"lambdalisue/vim-suda",
|
},
|
||||||
init = function()
|
{
|
||||||
vim.g.suda_smart_edit = 1
|
"olimorris/onedarkpro.nvim",
|
||||||
end,
|
priority = 1000,
|
||||||
},
|
config = function()
|
||||||
{
|
require("config.themelight")
|
||||||
"nvim-tree/nvim-web-devicons",
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
event = "VeryLazy",
|
dependencies = {
|
||||||
config = function()
|
"nvim-lua/plenary.nvim",
|
||||||
require("config.barbar")
|
},
|
||||||
end,
|
config = function()
|
||||||
},
|
require("config.telescope")
|
||||||
{
|
end,
|
||||||
"nvim-lualine/lualine.nvim",
|
},
|
||||||
event = "VeryLazy",
|
{
|
||||||
config = function ()
|
"lambdalisue/vim-suda",
|
||||||
require("config.lualine")
|
init = function()
|
||||||
end,
|
vim.g.suda_smart_edit = 1
|
||||||
},
|
end,
|
||||||
{
|
},
|
||||||
"mawkler/modicator.nvim",
|
{
|
||||||
setup = function()
|
"nvim-tree/nvim-web-devicons",
|
||||||
vim.o.cursorline = true
|
},
|
||||||
vim.o.number = true
|
{
|
||||||
vim.o.termguicolors = true
|
"akinsho/bufferline.nvim",
|
||||||
end,
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.modicator")
|
require("config.barbar")
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"shinchu/lightline-gruvbox.vim",
|
"nvim-lualine/lualine.nvim",
|
||||||
},
|
event = "VeryLazy",
|
||||||
{
|
config = function ()
|
||||||
"jiaoshijie/undotree",
|
if vim.env.TMUX then
|
||||||
config = function()
|
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
|
||||||
require("config.undotree")
|
callback = function()
|
||||||
end,
|
vim.defer_fn( function()
|
||||||
},
|
vim.opt.laststatus = 0
|
||||||
{
|
end, 100)
|
||||||
"hiphish/rainbow-delimiters.nvim",
|
end,
|
||||||
enabled = true,
|
})
|
||||||
},
|
vim.o.laststatus = 0
|
||||||
{
|
end
|
||||||
"windwp/nvim-autopairs",
|
require("config.lualine")
|
||||||
event = "InsertEnter",
|
end,
|
||||||
config = function()
|
},
|
||||||
require("config.autopairs")
|
{
|
||||||
end,
|
"mawkler/modicator.nvim",
|
||||||
},
|
config = function()
|
||||||
{
|
require("config.modicator")
|
||||||
"tpope/vim-fugitive",
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-notify",
|
"shinchu/lightline-gruvbox.vim",
|
||||||
config = function()
|
},
|
||||||
require "config.notify"
|
{
|
||||||
end,
|
"jiaoshijie/undotree",
|
||||||
},
|
config = function()
|
||||||
{
|
require("config.undotree")
|
||||||
"mfussenegger/nvim-dap",
|
end,
|
||||||
config = function()
|
},
|
||||||
require("config.dapconf")
|
{
|
||||||
end,
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
},
|
enabled = true,
|
||||||
{
|
},
|
||||||
"folke/snacks.nvim",
|
{
|
||||||
priority = 1000,
|
"windwp/nvim-autopairs",
|
||||||
lazy = false,
|
event = "InsertEnter",
|
||||||
---@type snacks.Config
|
config = function()
|
||||||
opts = {
|
require("config.autopairs")
|
||||||
bigfile = { enabled = true },
|
end,
|
||||||
dashboard = { enabled = true },
|
},
|
||||||
explorer = { enabled = true },
|
{
|
||||||
indent = {
|
"tpope/vim-fugitive",
|
||||||
enabled = true,
|
},
|
||||||
scope = {
|
{
|
||||||
enabled = false,
|
"rcarriga/nvim-notify",
|
||||||
underline = true,
|
config = function()
|
||||||
animate = {
|
require "config.notify"
|
||||||
enabled = true,
|
end,
|
||||||
fps = 144,
|
},
|
||||||
easing = "inExpo",
|
{
|
||||||
duration = 20,
|
"zbirenbaum/copilot.lua",
|
||||||
},
|
lazy = true,
|
||||||
},
|
cmd = "Copilot",
|
||||||
chunk = {
|
event = "InsertEnter",
|
||||||
enabled = true,
|
config = function()
|
||||||
char = {
|
require "config.copilot"
|
||||||
corner_top = "╭",
|
end,
|
||||||
corner_bottom = "╰",
|
},
|
||||||
vertical = "│",
|
{
|
||||||
arrow = "╼",
|
"CopilotC-Nvim/CopilotChat.nvim",
|
||||||
},
|
dependencies = {
|
||||||
},
|
{ "zbirenbaum/copilot.lua" },
|
||||||
},
|
{ "nvim-lua/plenary.nvim", branch = "master" },
|
||||||
input = { enabled = true },
|
},
|
||||||
picker = {
|
build = "make tiktoken",
|
||||||
enabled = true,
|
config = function()
|
||||||
hidden = true,
|
require "config.copilotchat"
|
||||||
ignored = true,
|
end,
|
||||||
},
|
},
|
||||||
notifier = { enabled = true },
|
{
|
||||||
quickfile = { enabled = true },
|
"mfussenegger/nvim-dap",
|
||||||
scope = { enabled = true },
|
config = function()
|
||||||
scroll = { enabled = false },
|
require("config.dapconf")
|
||||||
statuscolumn = { enabled = true },
|
end,
|
||||||
words = { enabled = true },
|
},
|
||||||
},
|
{
|
||||||
},
|
require("config.snacks")
|
||||||
{
|
},
|
||||||
"notken12/base46-colors",
|
{
|
||||||
},
|
"notken12/base46-colors",
|
||||||
-- {
|
},
|
||||||
-- "mason-org/mason-lspconfig.nvim",
|
-- {
|
||||||
-- opts = {},
|
-- "mason-org/mason-lspconfig.nvim",
|
||||||
-- dependencies = {
|
-- opts = {},
|
||||||
-- { "mason-org/mason.nvim", opts = {} },
|
-- dependencies = {
|
||||||
-- "neovim/nvim-lspconfig",
|
-- { "mason-org/mason.nvim", opts = {} },
|
||||||
-- },
|
-- "neovim/nvim-lspconfig",
|
||||||
-- },
|
-- },
|
||||||
{
|
-- },
|
||||||
"folke/lazydev.nvim",
|
{
|
||||||
ft = "lua",
|
"folke/lazydev.nvim",
|
||||||
opts = function()
|
ft = "lua",
|
||||||
require("config.lazydev")
|
opts = function()
|
||||||
end,
|
require("config.lazydev")
|
||||||
},
|
end,
|
||||||
{
|
},
|
||||||
"neovim/nvim-lspconfig",
|
{
|
||||||
dependencies = {
|
"neovim/nvim-lspconfig",
|
||||||
"williamboman/mason.nvim",
|
enabled = true,
|
||||||
"williamboman/mason-lspconfig.nvim",
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"williamboman/mason.nvim",
|
||||||
"hrsh7th/cmp-buffer",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-cmdline",
|
"hrsh7th/cmp-buffer",
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/cmp-path",
|
||||||
"L3MON4D3/LuaSnip",
|
"hrsh7th/cmp-cmdline",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"hrsh7th/nvim-cmp",
|
||||||
"j-hui/fidget.nvim",
|
"L3MON4D3/LuaSnip",
|
||||||
},
|
"saadparwaiz1/cmp_luasnip",
|
||||||
config = function()
|
"j-hui/fidget.nvim",
|
||||||
require("config.lspconfig")
|
},
|
||||||
end,
|
config = function()
|
||||||
},
|
require("config.lspconfig")
|
||||||
{
|
end,
|
||||||
"smolck/command-completion.nvim",
|
},
|
||||||
opts = {
|
{
|
||||||
border = nil,
|
"smolck/command-completion.nvim",
|
||||||
highlight_selection = true,
|
opts = {
|
||||||
use_matchfuzzy = true,
|
border = nil,
|
||||||
tab_completion = true,
|
highlight_selection = true,
|
||||||
},
|
use_matchfuzzy = true,
|
||||||
},
|
tab_completion = true,
|
||||||
{
|
},
|
||||||
"mfussenegger/nvim-jdtls",
|
},
|
||||||
},
|
{
|
||||||
{
|
"andweeb/presence.nvim",
|
||||||
"ThePrimeagen/harpoon",
|
},
|
||||||
branch = "harpoon2",
|
{
|
||||||
dependencies = {
|
"mfussenegger/nvim-jdtls",
|
||||||
"nvim-lua/plenary.nvim",
|
},
|
||||||
},
|
{
|
||||||
config = function()
|
"ThePrimeagen/harpoon",
|
||||||
require("config.harpoon")
|
branch = "harpoon2",
|
||||||
end,
|
dependencies = {
|
||||||
},
|
"nvim-lua/plenary.nvim",
|
||||||
{
|
},
|
||||||
"catgoose/nvim-colorizer.lua",
|
config = function()
|
||||||
config = function()
|
require("config.harpoon")
|
||||||
require("config.colorizer")
|
end,
|
||||||
end,
|
},
|
||||||
},
|
{
|
||||||
{
|
"catgoose/nvim-colorizer.lua",
|
||||||
"ziglang/zig.vim",
|
config = function()
|
||||||
},
|
require("config.colorizer")
|
||||||
{
|
end,
|
||||||
"mg979/vim-visual-multi",
|
},
|
||||||
branch = "master",
|
{
|
||||||
},
|
"ziglang/zig.vim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mg979/vim-visual-multi",
|
||||||
|
branch = "master",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"elkowar/yuck.vim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"f3fora/nvim-texlabconfig",
|
||||||
|
config = function()
|
||||||
|
require("config.texlab")
|
||||||
|
end,
|
||||||
|
build = "go build",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lancewilhelm/horizon-extended.nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vimpostor/vim-tpipeline",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yazeed1s/minimal.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.g.minimal_italic_comments = true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ThePrimeagen/refactoring.nvim",
|
||||||
|
config = function()
|
||||||
|
require("config.refactoring")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Yazeed1s/minimal.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.g.minimal_italic_comments = true
|
||||||
|
vim.g.minimal_italic_functions = true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"propet/colorscheme-persist.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
config = true,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>sp",
|
||||||
|
function()
|
||||||
|
require("colorscheme-persist").picker()
|
||||||
|
end,
|
||||||
|
mode = "n",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
picker_opts = require("telescope.themes").get_dropdown({
|
||||||
|
enable_preview = true,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aserowy/tmux.nvim",
|
||||||
|
config = function()
|
||||||
|
require("config.tmux")
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user