@@ -1,11 +1,55 @@
|
||||
{
|
||||
"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": {
|
||||
"command": "hyprls",
|
||||
"filetypes": ["hyprlang"]
|
||||
},
|
||||
"qml": {
|
||||
"command": "qmlls6",
|
||||
"filetypes": ["qml"]
|
||||
}
|
||||
},
|
||||
"git.addedSign.hlGroup": "GitGutterAdd",
|
||||
"git.changedSign.hlGroup": "GitGutterChange",
|
||||
"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"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local config = {
|
||||
local ionfig = {
|
||||
cmd = {'/usr/bin/jdtls'},
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
}
|
||||
|
||||
@@ -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,8 +1,22 @@
|
||||
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("options")
|
||||
require("globals")
|
||||
require("mappings")
|
||||
require("autocmd")
|
||||
require("minimodules").load_modules()
|
||||
-- require("coc-settings")
|
||||
|
||||
if vim.g.neovide then
|
||||
require("config.neovide")
|
||||
@@ -14,5 +28,3 @@ vim.filetype.add({
|
||||
[".*/uwsm/env.*"] = "zsh",
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd[[colorscheme onedark]]
|
||||
|
||||
@@ -2,6 +2,19 @@ local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id( args.data.client_id )
|
||||
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)
|
||||
@@ -29,6 +29,7 @@ local cmp_kinds = {
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
preselect = 'None',
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr' },
|
||||
format = function(_, vim_item)
|
||||
|
||||
@@ -6,5 +6,6 @@ require("colorizer").setup({
|
||||
tailwind = true,
|
||||
sass = { enable = true, parsers = { "css" }},
|
||||
virtualtext_inline = 'before',
|
||||
AARRGGBB = true,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -49,16 +49,11 @@ require("copilot").setup({
|
||||
-- hypr = false,
|
||||
-- ["."] = false,
|
||||
},
|
||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
||||
copilot_node_command = 'node',
|
||||
server_opts_overrides = {},
|
||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||
callback = function()
|
||||
vim.cmd( "CopilotChatSave AutoSave" )
|
||||
end,
|
||||
}),
|
||||
vim.api.nvim_create_autocmd( "VimEnter", {
|
||||
callback = function()
|
||||
vim.cmd( "CopilotChatLoad AutoSave" )
|
||||
end,
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
require("CopilotChat").setup {
|
||||
-- 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: ',
|
||||
},
|
||||
|
||||
temperature = 0.2,
|
||||
|
||||
providers = {
|
||||
tabby = {
|
||||
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
})
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
-- bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
|
||||
@@ -51,6 +51,13 @@ require("mason-lspconfig").setup({
|
||||
}
|
||||
end,
|
||||
|
||||
["tailwindcss"] = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.tailwindcss.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end,
|
||||
|
||||
["css-lsp"] = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.cssls.setup {
|
||||
@@ -93,6 +100,7 @@ require("mason-lspconfig").setup({
|
||||
})
|
||||
|
||||
cmp.setup {
|
||||
preselect = 'None',
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr' },
|
||||
format = function(entry, vim_item)
|
||||
@@ -152,12 +160,15 @@ cmp.setup {
|
||||
|
||||
vim.diagnostic.config({
|
||||
-- update_in_insert = true,
|
||||
virtual_text = true,
|
||||
virtual_text = false,
|
||||
virtual_lines = false,
|
||||
signs = true,
|
||||
underline = true,
|
||||
float = {
|
||||
focusable = false,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
source = true,
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
@@ -204,15 +215,20 @@ lspconfig("texlab", {
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig("qmlls", {
|
||||
cmd = { "qmlls6" },
|
||||
})
|
||||
|
||||
local lspenable = vim.lsp.enable
|
||||
local servers = {
|
||||
-- "html",
|
||||
"html",
|
||||
"bashls",
|
||||
"pyright",
|
||||
-- "ts_ls",
|
||||
-- "texlab",
|
||||
-- "jdtls",
|
||||
-- "sourcekit",
|
||||
"ts_ls",
|
||||
"texlab",
|
||||
"sourcekit",
|
||||
"qmlls",
|
||||
"tailwindcss",
|
||||
}
|
||||
|
||||
for _, server in ipairs(servers) do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local fn = vim.fn
|
||||
|
||||
local get_active_lsp = function()
|
||||
local msg = "🚫"
|
||||
local msg = ""
|
||||
local buf_ft = vim.api.nvim_get_option_value("filetype", {})
|
||||
local clients = vim.lsp.get_clients { bufnr = 0 }
|
||||
if next(clients) == nil then
|
||||
@@ -76,6 +76,7 @@ local virtual_env = function()
|
||||
end
|
||||
|
||||
require("lualine").setup {
|
||||
laststatus = 0,
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
@@ -110,7 +111,7 @@ require("lualine").setup {
|
||||
{
|
||||
"filename",
|
||||
symbols = {
|
||||
readonly = "[🔒]",
|
||||
readonly = "[]",
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -138,7 +139,7 @@ require("lualine").setup {
|
||||
{
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
symbols = { error = "🆇 ", warn = "⚠️ ", info = "ℹ️ ", hint = " " },
|
||||
symbols = { error = " ", warn = " ", info = " ", hint = " " },
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
content = {
|
||||
active = nil,
|
||||
inactive = nil,
|
||||
},
|
||||
use_icons = true,
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
require("mini.splitjoin").setup({
|
||||
mappings = {
|
||||
toggle = "gS",
|
||||
},
|
||||
|
||||
detect = {
|
||||
brackets = { '%b()', '%b{}', '%b[]' },
|
||||
|
||||
separator = '[,;]',
|
||||
},
|
||||
})
|
||||
@@ -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
|
||||
})
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local M = {}
|
||||
local i = {}
|
||||
|
||||
function M.foldexpr()
|
||||
local lnum = vim.v.lnum
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Lua
|
||||
-- lua
|
||||
require('onedarkpro').setup({
|
||||
highlights = {
|
||||
Comment = { italic = true },
|
||||
|
||||
+3
-1
@@ -11,9 +11,11 @@ require("tmux").setup({
|
||||
},
|
||||
resize = {
|
||||
enable_default_keybindings = false,
|
||||
resize_step_x = 5,
|
||||
resize_step_y = 5,
|
||||
},
|
||||
swap = {
|
||||
cycle_navigation = true,
|
||||
cycle_navigation = false,
|
||||
enable_default_keybindings = false,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all",
|
||||
ignore_install = { "ipkg" },
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
|
||||
+22
-4
@@ -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" })
|
||||
|
||||
-- Alt + Arrow Key to change buffer
|
||||
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-Up>", "<C-w>k", { desc = "Move to top split" })
|
||||
map("n", "<A-Right>", "<C-w>l", { desc = "Move to right 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-Up>", "<C-w>k", { desc = "Move to top 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
|
||||
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
|
||||
@@ -59,3 +69,11 @@ map("n", "<leader><leader>", function()
|
||||
end)
|
||||
|
||||
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.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.expandtab = false
|
||||
vim.opt.smartindent = false
|
||||
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
|
||||
|
||||
vim.opt.wrap = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.swapfile = false
|
||||
@@ -21,13 +25,7 @@ vim.opt.updatetime = 50
|
||||
vim.opt.colorcolumn = "80"
|
||||
vim.opt.textwidth = 80
|
||||
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.laststatus = 3
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
vim.o.cursorline = true
|
||||
vim.o.cursorlineopt = "number"
|
||||
@@ -36,6 +34,7 @@ vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.o.mouse = "a"
|
||||
vim.o.number = true
|
||||
vim.o.termguicolors = true
|
||||
vim.o.numberwidth = 3
|
||||
vim.o.ruler = false
|
||||
vim.o.showmode = false
|
||||
@@ -52,3 +51,8 @@ local is_windows = vim.fn.has "win32" ~= 0
|
||||
local sep = 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.api.nvim_set_hl( 0, "Cursor", { reverse = true })
|
||||
|
||||
-- vim-tpipeline
|
||||
vim.g.tpipeline_restore = 1
|
||||
|
||||
+116
-48
@@ -1,10 +1,28 @@
|
||||
return {
|
||||
{
|
||||
"nvim-mini/mini.nvim",
|
||||
version = false,
|
||||
|
||||
modules = function()
|
||||
require("config.mini-modules")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("config.treesitter")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"sainnhe/edge",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.g.edge_enable_italic = 1
|
||||
vim.g.edge_style = "default"
|
||||
vim.g.edge_menu_selection_background = "purple"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
@@ -47,16 +65,21 @@ return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function ()
|
||||
if vim.env.TMUX then
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
|
||||
callback = function()
|
||||
vim.defer_fn( function()
|
||||
vim.opt.laststatus = 0
|
||||
end, 100)
|
||||
end,
|
||||
})
|
||||
vim.o.laststatus = 0
|
||||
end
|
||||
require("config.lualine")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mawkler/modicator.nvim",
|
||||
setup = function()
|
||||
vim.o.cursorline = true
|
||||
vim.o.number = true
|
||||
vim.o.termguicolors = true
|
||||
end,
|
||||
config = function()
|
||||
require("config.modicator")
|
||||
end
|
||||
@@ -90,6 +113,26 @@ return {
|
||||
require "config.notify"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
lazy = true,
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require "config.copilot"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
dependencies = {
|
||||
{ "zbirenbaum/copilot.lua" },
|
||||
{ "nvim-lua/plenary.nvim", branch = "master" },
|
||||
},
|
||||
build = "make tiktoken",
|
||||
config = function()
|
||||
require "config.copilotchat"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
@@ -97,49 +140,7 @@ return {
|
||||
end,
|
||||
},
|
||||
{
|
||||
"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 = false,
|
||||
underline = true,
|
||||
animate = {
|
||||
enabled = true,
|
||||
fps = 144,
|
||||
easing = "inExpo",
|
||||
duration = 20,
|
||||
},
|
||||
},
|
||||
chunk = {
|
||||
enabled = true,
|
||||
char = {
|
||||
corner_top = "╭",
|
||||
corner_bottom = "╰",
|
||||
vertical = "│",
|
||||
arrow = "╼",
|
||||
},
|
||||
},
|
||||
},
|
||||
input = { enabled = true },
|
||||
picker = {
|
||||
enabled = true,
|
||||
hidden = true,
|
||||
ignored = true,
|
||||
},
|
||||
notifier = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
scroll = { enabled = false },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
},
|
||||
require("config.snacks")
|
||||
},
|
||||
{
|
||||
"notken12/base46-colors",
|
||||
@@ -161,6 +162,7 @@ return {
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
@@ -186,6 +188,9 @@ return {
|
||||
tab_completion = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
},
|
||||
@@ -212,4 +217,67 @@ return {
|
||||
"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