backup changes
This commit is contained in:
parent
04aaa4328a
commit
4e52af7dec
@ -27,6 +27,23 @@ keymap('v', '<leader>jm', "<Esc><Cmd>lua require('jdtls').extract_method(true)<C
|
||||
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
||||
if client.name == 'jdtls' or client.name == 'jdt.ls' then
|
||||
-- client.server_capabilities.documentFormattingProvider = false
|
||||
vim.lsp.codelens.refresh()
|
||||
if JAVA_DAP_ACTIVE then
|
||||
require('jdtls').setup_dap { hotcodereplace = 'auto' }
|
||||
require('jdtls.setup').add_commands()
|
||||
require('jdtls.dap').setup_dap_main_class_configs()
|
||||
end
|
||||
end
|
||||
-- -- util.info(client.name .. " " .. (enable and "yes" or "no"), "format")
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
-- client.server_capabilities.documentFormattingProvider = true
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
-- vim.opt_local.cmdheight = 2 -- more space in the neovim command line for displaying messages
|
||||
|
||||
-- Determine OS
|
||||
@ -55,7 +72,7 @@ local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
|
||||
|
||||
local workspace_dir = WORKSPACE_PATH .. project_name
|
||||
|
||||
JAVA_DAP_ACTIVE = false
|
||||
JAVA_DAP_ACTIVE = true
|
||||
|
||||
local bundles = {
|
||||
vim.fn.glob(
|
||||
|
23
init.lua
23
init.lua
@ -1,29 +1,14 @@
|
||||
vim.loader.enable()
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system {
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
'--single-branch',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
lazypath,
|
||||
}
|
||||
end
|
||||
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
require 'config.lazy'
|
||||
require 'config.autocmd'
|
||||
require 'config.options'
|
||||
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'LazyVimStarted',
|
||||
callback = function()
|
||||
vim.cmd 'colorscheme neogruber'
|
||||
require 'feline'
|
||||
require 'config.mappings'
|
||||
require 'config.autocmd'
|
||||
require 'feline'
|
||||
require 'dressing'
|
||||
require 'NeoSwap'
|
||||
end,
|
||||
})
|
||||
|
||||
require 'config.settings'
|
||||
require 'config.lazy'
|
||||
|
@ -1,65 +1,38 @@
|
||||
-- vim.api.nvim_set_hl(0, 'NormalFloat', { bg = '#282828' })
|
||||
-- vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'NONE' }) vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'NONE' })
|
||||
-- vim.api.nvim_set_hl(0, 'StatusLine', { bg = 'NONE' })
|
||||
local function augroup(name)
|
||||
return vim.api.nvim_create_augroup('neo_' .. name, { clear = true })
|
||||
end
|
||||
|
||||
-- Use 'q' to quit from common plugins
|
||||
-- close some filetypes with <q>
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
pattern = { 'qf', 'help', 'man', 'lspinfo', 'spectre_panel', 'lir' },
|
||||
callback = function()
|
||||
vim.cmd [[
|
||||
nnoremap <silent> <buffer> q :close<CR>
|
||||
set nobuflisted
|
||||
]]
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
|
||||
end,
|
||||
})
|
||||
|
||||
-- use 2 spaces for cpp
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
pattern = { 'cpp', 'cc', 'hpp', 'hh', 'md', 'markdown', 'java' },
|
||||
callback = function()
|
||||
vim.opt.ts = 4
|
||||
vim.opt.sw = 4
|
||||
vim.opt.ts = 2
|
||||
vim.opt.sw = 2
|
||||
vim.opt.expandtab = true
|
||||
end,
|
||||
})
|
||||
|
||||
-- Fixes Autocomment
|
||||
vim.api.nvim_create_autocmd({ 'BufWinEnter' }, {
|
||||
callback = function()
|
||||
vim.cmd 'set formatoptions-=cro'
|
||||
end,
|
||||
})
|
||||
|
||||
-- Highlight Yanked Text
|
||||
-- Highlight on yank
|
||||
vim.api.nvim_create_autocmd({ 'TextYankPost' }, {
|
||||
callback = function()
|
||||
vim.highlight.on_yank { higroup = 'Visual', timeout = 200 }
|
||||
end,
|
||||
})
|
||||
|
||||
-- vim.api.nvim_create_augroup('diagnostics', { clear = true })
|
||||
--
|
||||
-- vim.api.nvim_create_autocmd({ 'DiagnosticChanged' }, {
|
||||
-- group = 'diagnostics',
|
||||
-- callback = function()
|
||||
-- vim.diagnostic.setloclist { open = false }
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ 'VimResized' }, {
|
||||
group = augroup 'resize_splits',
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
callback = function()
|
||||
vim.cmd 'tabdo wincmd ='
|
||||
local current_tab = vim.fn.tabpagenr()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
vim.cmd("tabnext " .. current_tab)
|
||||
end,
|
||||
})
|
||||
|
||||
-- wrap and check for spell in text filetypes
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup 'wrap_spell',
|
||||
pattern = { 'gitcommit', 'markdown' },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
@ -67,12 +40,6 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||
vim.opt_local.textwidth = 80
|
||||
end,
|
||||
})
|
||||
vim.cmd [[
|
||||
augroup change_cursor
|
||||
au!
|
||||
au ExitPre * :set guicursor=a:hor90
|
||||
augroup END
|
||||
]]
|
||||
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = { buffer = 0 }
|
||||
@ -83,9 +50,26 @@ end
|
||||
-- if you only want these mappings for toggle term use term://*toggleterm#* instead
|
||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
|
||||
pattern = { '*.java' },
|
||||
callback = function()
|
||||
vim.lsp.codelens.refresh()
|
||||
-- go to last loc when opening a buffer
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
callback = function(event)
|
||||
local exclude = { "gitcommit" }
|
||||
local buf = event.buf
|
||||
if vim.tbl_contains(exclude, vim.bo[buf].filetype) or vim.b[buf].lazyvim_last_loc then
|
||||
return
|
||||
end
|
||||
vim.b[buf].lazyvim_last_loc = true
|
||||
local mark = vim.api.nvim_buf_get_mark(buf, '"')
|
||||
local lcount = vim.api.nvim_buf_line_count(buf)
|
||||
if mark[1] > 0 and mark[1] <= lcount then
|
||||
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd [[
|
||||
augroup change_cursor
|
||||
au!
|
||||
au ExitPre * :set guicursor=a:hor90
|
||||
augroup END
|
||||
]]
|
||||
|
@ -1,3 +1,16 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require('lazy').setup('plugins', {
|
||||
defaults = { lazy = true },
|
||||
change_detection = {
|
||||
@ -6,13 +19,13 @@ require('lazy').setup('plugins', {
|
||||
performance = {
|
||||
reset_packpath = true,
|
||||
rtp = {
|
||||
reset = true,
|
||||
-- reset = true,
|
||||
-- paths = { '~/.local/share/nvim/site/' },
|
||||
disabled_plugins = {
|
||||
'fzf',
|
||||
'gzip',
|
||||
'matchit',
|
||||
'matchparen',
|
||||
-- 'matchit',
|
||||
-- 'matchparen',
|
||||
'netrwPlugin',
|
||||
'netrw',
|
||||
'tarPlugin',
|
||||
|
@ -3,8 +3,8 @@ local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
keymap('n', '<c-,>', '<cmd>silent! NeoSwapPrev<cr>', opt)
|
||||
keymap('n', '<c-.>', '<cmd>silent! NeoSwapNext<cr>', opt)
|
||||
-- TODO: Remove this
|
||||
keymap('n', '<insert>', '<cmd>Lazy profile<cr>', opt)
|
||||
|
||||
-- resize {{{
|
||||
keymap('n', '<c-up>', '<cmd>resize -2<cr>', opt)
|
||||
keymap('n', '<c-down>', '<cmd>resize +2<cr>', opt)
|
||||
@ -21,6 +21,7 @@ inoremap <c-M> <Esc>:m .+1<CR>==gi
|
||||
inoremap <c-L> <Esc>:m .-2<CR>==gi
|
||||
vnoremap M :m '>+1<CR>gv=gv
|
||||
vnoremap L :m '<-2<CR>gv=gv
|
||||
imap <c-s> <Esc>[s1z=`]a
|
||||
]])
|
||||
|
||||
keymap('n', 'Y', '"+y', opt)
|
||||
@ -41,29 +42,9 @@ keymap('t', '<end>', '<cmd>ToggleTerm direction=float<cr>', opt)
|
||||
keymap('v', '<end>', '<cmd>ToggleTerm direction=float<cr>', opt)
|
||||
keymap('i', '<end>', '<cmd>ToggleTerm direction=float<cr>', opt)
|
||||
-- }}}
|
||||
-- trouble {{{
|
||||
vim.api.nvim_set_keymap('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap(
|
||||
'n',
|
||||
'<leader>xw',
|
||||
'<cmd>TroubleToggle workspace_diagnostics<cr>',
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap(
|
||||
'n',
|
||||
'<leader>xd',
|
||||
'<cmd>TroubleToggle document_diagnostics<cr>',
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
-- }}}
|
||||
|
||||
keymap('n', '<BS>', ':', { noremap = true })
|
||||
keymap('n', ';', ':', { noremap = true })
|
||||
keymap('n', '<leader>rs', ':s///gI<Left><Left><Left><Left><Left><Left>', { noremap = true })
|
||||
keymap('n', '<leader>rr', ':%s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||
keymap('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||
|
||||
keymap('n', 'D', '"_d', { noremap = true })
|
||||
|
||||
@ -84,19 +65,22 @@ keymap('n', '<leader>ls', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opt)
|
||||
keymap('n', '<leader>lq', '<cmd>lua vim.diagnostic.setloclist()<CR>', opt)
|
||||
keymap('n', '<leader>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opt)
|
||||
|
||||
keymap('n', '<leader>rs', ':s///gI<Left><Left><Left><Left><Left><Left>', { noremap = true })
|
||||
keymap('n', '<leader>rr', ':%s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||
keymap('v', '<leader>r', ':s///gI<Left><Left><Left><Left>', { noremap = true })
|
||||
|
||||
function MapDHM()
|
||||
keymap('n', 'i', 'l', { noremap = true })
|
||||
keymap('n', 'n', 'j', { noremap = true })
|
||||
keymap('n', 'e', 'k', { noremap = true })
|
||||
keymap('n', 'l', 'i', { noremap = true })
|
||||
keymap('n', 'j', 'n', { noremap = true })
|
||||
keymap('n', 'J', 'N', { noremap = true })
|
||||
keymap('n', 'N', 'J', { noremap = true })
|
||||
keymap('x', 'l', 'i', { noremap = true })
|
||||
keymap('x', 'i', 'l', { noremap = true })
|
||||
keymap('x', 'n', 'j', { noremap = true })
|
||||
keymap('x', 'e', 'k', { noremap = true })
|
||||
keymap('n', 'l', 'i', { noremap = true })
|
||||
keymap('n', 'N', 'J', { noremap = true })
|
||||
keymap('n', 'j', 'n', { noremap = true })
|
||||
keymap('n', 'J', 'N', { noremap = true })
|
||||
keymap('n', '<nop>', 'I', { noremap = true })
|
||||
end
|
||||
|
||||
@ -188,7 +172,6 @@ vim.keymap.set('n', 'X', function()
|
||||
end, { noremap = true, silent = true }) ]]
|
||||
-- }}}
|
||||
-- leader mappings {{{
|
||||
-- TODO create entire treesitter section
|
||||
local mappings = {
|
||||
['<leader>'] = {
|
||||
function()
|
||||
@ -196,6 +179,8 @@ local mappings = {
|
||||
end,
|
||||
'Buffers',
|
||||
},
|
||||
['s'] = { '<cmd>ASToggle<cr>', 'Auto Save toggle' },
|
||||
['D'] = { '<cmd>Dashboard<cr>', 'Dashboard' },
|
||||
['.'] = { '<cmd>Oil<cr>', 'Oil' },
|
||||
['f'] = { '<cmd>e ~/.config/nvim/ <cr>', 'Neovim config' },
|
||||
['rr'] = 'Search and replace all',
|
||||
@ -253,7 +238,35 @@ local mappings = {
|
||||
},
|
||||
['g'] = { '<cmd>Neogit<cr>', 'Neogit' },
|
||||
d = {
|
||||
s = { '<cmd>Lazy load nvim-gdb <cr>', 'Load GDB' },
|
||||
S = { '<cmd>Lazy load nvim-gdb <cr>', 'Load GDB' },
|
||||
b = { "<cmd>DapToggleBreakpoint<cr>", "Toggle Breakpoint" },
|
||||
c = { "<cmd>DapContinue<cr>", "Continue" },
|
||||
n = { "<cmd>DapStepOver<cr>", "Step Over" },
|
||||
i = { "<cmd>DapStepInto<cr>", "Step Into" },
|
||||
o = { "<cmd>DapStepOut<cr>", "Step Out" },
|
||||
d = {
|
||||
function()
|
||||
require("dapui").toggle()
|
||||
end,
|
||||
"Toggle DAP UI" },
|
||||
s = {
|
||||
function()
|
||||
require("dapui").float_element("scopes", _)
|
||||
end,
|
||||
"Scopes"
|
||||
},
|
||||
r = {
|
||||
function()
|
||||
require("dapui").float_element("repl", _)
|
||||
end,
|
||||
"REPL"
|
||||
},
|
||||
C = {
|
||||
function()
|
||||
require("dapui").float_element("console", _)
|
||||
end,
|
||||
"Console"
|
||||
},
|
||||
},
|
||||
l = {
|
||||
name = 'LSP',
|
||||
@ -288,6 +301,14 @@ local mappings = {
|
||||
v = { '<C-w>v', 'Vertical split' },
|
||||
h = { '<C-w>s', 'Horizontal split' },
|
||||
},
|
||||
x = {
|
||||
name = 'Trouble',
|
||||
l = { '<cmd>TroubleToggle loclist<cr>', 'Loclist' },
|
||||
q = { '<cmd>TroubleToggle quickfix<cr>', 'Quickfix' },
|
||||
x = { '<cmd>TroubleToggle<cr>', 'Toggle' },
|
||||
w = { '<cmd>TroubleToggle workspace_diagnostics<cr>', 'Workspace' },
|
||||
d = { '<cmd>TroubleToggle document_diagnostics<cr>', 'Document' },
|
||||
},
|
||||
}
|
||||
-- }}}
|
||||
wk.register(mappings, opts)
|
||||
|
@ -36,13 +36,14 @@ let g:nvimgdb_config_override = {
|
||||
|
||||
opt.termguicolors = true
|
||||
opt.mouse = 'nv'
|
||||
opt.fileencoding = 'utf-8'
|
||||
-- opt.fileencoding = 'utf-8'
|
||||
opt.splitbelow = true
|
||||
opt.splitright = true
|
||||
opt.showmode = false
|
||||
opt.undofile = true
|
||||
opt.updatetime = 300
|
||||
opt.backup = false
|
||||
-- vim.api.nvim_set_option("clipboard","unnamed")
|
||||
opt.clipboard:prepend { 'unnamedplus', 'unnamed' }
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
@ -56,52 +57,8 @@ opt.fillchars = 'eob: '
|
||||
opt.cmdheight = 1
|
||||
opt.grepprg = 'rg --vimgrep --no-heading --smart-case --hidden'
|
||||
opt.grepformat = '%f:%l:%c:%m'
|
||||
opt.cursorline = true
|
||||
opt.cursorlineopt = 'number'
|
||||
|
||||
vim.api.nvim_create_user_command('Cd', 'lcd %:p:h', { nargs = 0 })
|
||||
vim.api.nvim_create_user_command('Grep', 'silent grep! <args> | TroubleToggle quickfix', { nargs = '+' })
|
||||
|
||||
local ignore_buftype = { 'quickfix', 'nofile', 'help' }
|
||||
local ignore_filetype = { 'gitcommit', 'gitrebase', 'svn', 'hgcommit' }
|
||||
|
||||
local function run()
|
||||
if vim.tbl_contains(ignore_buftype, vim.bo.buftype) then
|
||||
return
|
||||
end
|
||||
|
||||
if vim.tbl_contains(ignore_filetype, vim.bo.filetype) then
|
||||
-- reset cursor to first line
|
||||
vim.cmd [[normal! gg]]
|
||||
return
|
||||
end
|
||||
|
||||
-- If a line has already been specified on the command line, we are done
|
||||
-- nvim file +num
|
||||
if vim.fn.line '.' > 1 then
|
||||
vim.cmd [[normal! zz]]
|
||||
return
|
||||
end
|
||||
|
||||
local last_line = vim.fn.line [['"]]
|
||||
local buff_last_line = vim.fn.line '$'
|
||||
|
||||
-- If the last line is set and the less than the last line in the buffer
|
||||
if last_line > 0 and last_line <= buff_last_line then
|
||||
local win_last_line = vim.fn.line 'w$'
|
||||
local win_first_line = vim.fn.line 'w0'
|
||||
-- Check if the last line of the buffer is the same as the win
|
||||
if win_last_line == buff_last_line then
|
||||
-- Set line to last line edited
|
||||
vim.cmd [[normal! g`"]]
|
||||
-- Try to center
|
||||
elseif buff_last_line - last_line > ((win_last_line - win_first_line) / 2) - 1 then
|
||||
vim.cmd [[normal! g`"zz]]
|
||||
else
|
||||
vim.cmd [[normal! G'"<c-e>]]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufWinEnter', 'FileType' }, {
|
||||
group = vim.api.nvim_create_augroup('nvim-lastplace', {}),
|
||||
callback = run,
|
||||
})
|
@ -5,40 +5,7 @@ M.has_words_before = function()
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match '%s' == nil
|
||||
end
|
||||
|
||||
M.lsp_config = {
|
||||
-- virtual_text = {
|
||||
-- prefix = '●',
|
||||
-- },
|
||||
virtual_text = false,
|
||||
signs = false,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
focusable = false,
|
||||
-- style = 'minimal',
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
}
|
||||
|
||||
M.lspservername = function()
|
||||
local msg = ''
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then return msg end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end
|
||||
|
||||
M.feline_theme = {
|
||||
M.feline_theme_dark = {
|
||||
fg = '#c9d1d9',
|
||||
bg = '#101010',
|
||||
green = '#66cc66',
|
||||
@ -53,6 +20,21 @@ M.feline_theme = {
|
||||
normal = '#A9A9A9'
|
||||
}
|
||||
|
||||
M.feline_theme_light = {
|
||||
bg = '#c9d1d9',
|
||||
fg = '#101010',
|
||||
green = '#66cc66',
|
||||
yellow = '#cca300',
|
||||
purple = '#c678dd',
|
||||
orange = '#cc8c3c',
|
||||
peanut = '#f6d5a4',
|
||||
red = '#e06c75',
|
||||
aqua = '#61afef',
|
||||
bg2 = '#484848',
|
||||
dark_red = '#f75f5f',
|
||||
normal = '#A9A9A9'
|
||||
}
|
||||
|
||||
M.feline_vi_mode_colors = {
|
||||
NORMAL = 'normal',
|
||||
OP = 'green',
|
||||
@ -71,18 +53,18 @@ local left_component_separator = {
|
||||
fg = '#4a4a4a',
|
||||
},
|
||||
}
|
||||
local right_component_separator = {
|
||||
str = ' ',
|
||||
hl = {
|
||||
fg = '#4a4a4a',
|
||||
},
|
||||
}
|
||||
local left_section_separator = {
|
||||
str = '█',
|
||||
hl = {
|
||||
fg = 'normal',
|
||||
},
|
||||
}
|
||||
-- local right_component_separator = {
|
||||
-- str = ' ',
|
||||
-- hl = {
|
||||
-- fg = '#4a4a4a',
|
||||
-- },
|
||||
-- }
|
||||
-- local left_section_separator = {
|
||||
-- str = '',
|
||||
-- hl = {
|
||||
-- fg = 'normal',
|
||||
-- },
|
||||
-- }
|
||||
local right_section_separator = {
|
||||
str = '',
|
||||
hl = {
|
||||
@ -128,22 +110,15 @@ M.feline_c = {
|
||||
},
|
||||
hl = function()
|
||||
return {
|
||||
bg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
fg = 'bg',
|
||||
fg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
-- fg = 'bg',
|
||||
style = 'bold',
|
||||
name = 'NeovimModeHLColor',
|
||||
}
|
||||
end,
|
||||
left_sep = 'block',
|
||||
right_sep = {
|
||||
str = '█',
|
||||
hl = function()
|
||||
return {
|
||||
fg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
style = 'bold',
|
||||
name = 'NeovimModeHLColor',
|
||||
}
|
||||
end,
|
||||
str = 'slant_right',
|
||||
},
|
||||
},
|
||||
diagnostic_errors = {
|
||||
@ -214,22 +189,15 @@ M.feline_c = {
|
||||
provider = 'position',
|
||||
hl = function()
|
||||
return {
|
||||
bg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
fg = 'bg',
|
||||
fg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
-- fg = 'bg',
|
||||
style = 'bold',
|
||||
name = 'NeovimModeHLColor',
|
||||
}
|
||||
end,
|
||||
right_sep = 'block',
|
||||
left_sep = {
|
||||
str = '█',
|
||||
hl = function()
|
||||
return {
|
||||
fg = require('feline.providers.vi_mode').get_mode_color(),
|
||||
style = 'bold',
|
||||
name = 'NeovimModeHLColor',
|
||||
}
|
||||
end,
|
||||
str = 'slant_left',
|
||||
},
|
||||
},
|
||||
startup = {
|
||||
|
30
lua/plugins/auto-save.lua
Normal file
30
lua/plugins/auto-save.lua
Normal file
@ -0,0 +1,30 @@
|
||||
return {
|
||||
'okuuva/auto-save.nvim',
|
||||
cmd = 'ASToggle',
|
||||
opts = {
|
||||
enabled = false, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
|
||||
execution_message = {
|
||||
enabled = true,
|
||||
message = function() -- message to print on save
|
||||
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
end,
|
||||
dim = 0.18, -- dim the color of `message`
|
||||
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
|
||||
},
|
||||
trigger_events = { -- See :h events
|
||||
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
|
||||
defer_save = { "InsertLeave", "TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
|
||||
cancel_defered_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
|
||||
},
|
||||
-- function that takes the buffer handle and determines whether to save the current buffer or not
|
||||
-- return true: if buffer is ok to be saved
|
||||
-- return false: if it's not ok to be saved
|
||||
-- if set to `nil` then no specific condition is applied
|
||||
condition = nil,
|
||||
write_all_buffers = false, -- write all buffers when the current one meets `condition`
|
||||
noautocmd = false, -- do not execute autocmds when saving
|
||||
debounce_delay = 100, -- delay after which a pending save is executed
|
||||
-- log debug messages to 'auto-save.log' file in neovim cache directory, set to `true` to enable
|
||||
debug = false,
|
||||
}
|
||||
}
|
25
lua/plugins/buffer_manager.lua
Normal file
25
lua/plugins/buffer_manager.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
'j-morano/buffer_manager.nvim',
|
||||
opts = {
|
||||
-- line_keys = '', -- deactivate line keybindings
|
||||
|
||||
short_term_names = true,
|
||||
focus_alternate_buffer = true,
|
||||
select_menu_item_commands = {
|
||||
edit = {
|
||||
key = '<CR>',
|
||||
command = 'edit',
|
||||
},
|
||||
v = {
|
||||
key = '<C-v>',
|
||||
command = 'vsplit',
|
||||
},
|
||||
h = {
|
||||
key = '<C-h>',
|
||||
command = 'split',
|
||||
},
|
||||
},
|
||||
width = 0.6,
|
||||
highlight = "Normal:Normal",
|
||||
},
|
||||
}
|
24
lua/plugins/colorizer.lua
Normal file
24
lua/plugins/colorizer.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
'NvChad/nvim-colorizer.lua',
|
||||
-- event = 'BufReadPre',
|
||||
cmd = 'ColorizerToggle',
|
||||
opts = {
|
||||
filetypes = { '*', '!lazy' },
|
||||
buftype = { '*', '!prompt', '!nofile' },
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes #ffffff
|
||||
names = false, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes: foreground, background
|
||||
-- Available modes for `mode`: foreground, background, virtualtext
|
||||
-- mode = "background", -- Set the display mode.
|
||||
-- virtualtext = "■",
|
||||
},
|
||||
},
|
||||
}
|
56
lua/plugins/comment.lua
Normal file
56
lua/plugins/comment.lua
Normal file
@ -0,0 +1,56 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
-- event = 'VeryLazy',
|
||||
keys = { 'gcc', { 'gc', mode = 'v' }, { 'gb', mode = 'v' } },
|
||||
opts = {
|
||||
-- -LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
---Line-comment keymap
|
||||
line = 'gc',
|
||||
---Block-comment keymap
|
||||
block = 'gb',
|
||||
},
|
||||
---LHS of extra mappings
|
||||
extra = {
|
||||
---Add comment on the line above
|
||||
above = 'gcO',
|
||||
---Add comment on the line below
|
||||
below = 'gco',
|
||||
---Add comment at the end of line
|
||||
eol = 'gca',
|
||||
},
|
||||
---Enable keybindings
|
||||
---NOTE: If given `false` then the plugin won't create any mappings
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = true,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = true,
|
||||
---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}`
|
||||
extended = false,
|
||||
},
|
||||
pre_hook = function(ctx)
|
||||
-- Only calculate commentstring for tsx filetypes
|
||||
if vim.bo.filetype == 'typescriptreact' then
|
||||
local U = require 'Comment.utils'
|
||||
|
||||
-- Determine whether to use linewise or blockwise commentstring
|
||||
local type = ctx.ctype == U.ctype.linewise and '__default' or '__multiline'
|
||||
|
||||
-- Determine the location where to calculate commentstring from
|
||||
local location = nil
|
||||
if ctx.ctype == U.ctype.blockwise then
|
||||
location = require('ts_context_commentstring.utils').get_cursor_location()
|
||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
location = require('ts_context_commentstring.utils')
|
||||
.get_visual_start_location()
|
||||
end
|
||||
|
||||
return require('ts_context_commentstring.internal').calculate_commentstring {
|
||||
key = type,
|
||||
location = location,
|
||||
}
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
82
lua/plugins/dap.lua
Normal file
82
lua/plugins/dap.lua
Normal file
@ -0,0 +1,82 @@
|
||||
return {
|
||||
{ 'mfussenegger/nvim-dap', },
|
||||
{
|
||||
'rcarriga/nvim-dap-ui',
|
||||
opts = {
|
||||
controls = {
|
||||
element = "repl",
|
||||
enabled = true,
|
||||
icons = {
|
||||
disconnect = "",
|
||||
pause = "",
|
||||
play = "",
|
||||
run_last = "",
|
||||
step_back = "",
|
||||
step_into = "",
|
||||
step_out = "",
|
||||
step_over = "",
|
||||
terminate = ""
|
||||
}
|
||||
},
|
||||
element_mappings = {},
|
||||
expand_lines = true,
|
||||
floating = {
|
||||
border = "single",
|
||||
mappings = {
|
||||
close = { "q", "<Esc>" }
|
||||
}
|
||||
},
|
||||
force_buffers = true,
|
||||
icons = {
|
||||
collapsed = "",
|
||||
current_frame = "",
|
||||
expanded = ""
|
||||
},
|
||||
layouts = { {
|
||||
elements = {
|
||||
{
|
||||
id = "scopes",
|
||||
size = 0.5
|
||||
},
|
||||
-- {
|
||||
-- id = "breakpoints",
|
||||
-- size = 0.25
|
||||
-- },
|
||||
{
|
||||
id = "stacks",
|
||||
size = 0.25
|
||||
},
|
||||
{
|
||||
id = "watches",
|
||||
size = 0.25
|
||||
}
|
||||
},
|
||||
position = "right",
|
||||
size = 40
|
||||
}, {
|
||||
elements = { {
|
||||
id = "repl",
|
||||
size = 0.5
|
||||
}, {
|
||||
id = "console",
|
||||
size = 0.5
|
||||
} },
|
||||
position = "bottom",
|
||||
size = 10
|
||||
} },
|
||||
mappings = {
|
||||
edit = "e",
|
||||
expand = { "<CR>", "<2-LeftMouse>" },
|
||||
open = "o",
|
||||
remove = "d",
|
||||
repl = "r",
|
||||
toggle = "t"
|
||||
},
|
||||
render = {
|
||||
indent = 1,
|
||||
max_value_lines = 100
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
return {
|
||||
'freddiehaddad/feline.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
local feline = require 'feline'
|
||||
local utils = require 'config.utils'
|
||||
local c = utils.feline_c
|
||||
local theme = utils.feline_theme
|
||||
local vi_mode_colors = utils.feline_vi_mode_colors
|
||||
|
||||
local left = {
|
||||
c.vim_mode,
|
||||
-- c.gitBranch,
|
||||
-- c.gitDiffAdded,
|
||||
-- c.gitDiffRemoved,
|
||||
-- c.gitDiffChanged,
|
||||
c.file_info,
|
||||
c.right_separator,
|
||||
c.lsp_client_names,
|
||||
c.diagnostic_errors,
|
||||
c.diagnostic_warnings,
|
||||
c.diagnostic_info,
|
||||
c.diagnostic_hints,
|
||||
}
|
||||
|
||||
-- local middle = {
|
||||
-- c.separator,
|
||||
-- }
|
||||
|
||||
local right = {
|
||||
c.file_type,
|
||||
c.search_count,
|
||||
c.macro,
|
||||
c.file_encoding,
|
||||
-- c.startup,
|
||||
c.line_percentage,
|
||||
c.select_count,
|
||||
c.position,
|
||||
}
|
||||
|
||||
local components = {
|
||||
active = {
|
||||
left,
|
||||
-- middle,
|
||||
right,
|
||||
},
|
||||
inactive = {
|
||||
left,
|
||||
-- middle,
|
||||
right,
|
||||
},
|
||||
}
|
||||
|
||||
feline.setup {
|
||||
components = components,
|
||||
theme = theme,
|
||||
vi_mode_colors = vi_mode_colors,
|
||||
}
|
||||
end,
|
||||
}
|
@ -1,346 +1,42 @@
|
||||
return {
|
||||
-- 'MunifTanjim/nui.nvim',
|
||||
|
||||
'folke/which-key.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- 'mfussenegger/nvim-jdtls',
|
||||
'mfussenegger/nvim-jdtls',
|
||||
'simrat39/rust-tools.nvim',
|
||||
'sakhnik/nvim-gdb',
|
||||
{ 'mg979/vim-visual-multi', event = 'VeryLazy' },
|
||||
{ 'rush-rs/tree-sitter-asm', ft = 'asm' },
|
||||
{ 'jghauser/mkdir.nvim', lazy = false },
|
||||
{
|
||||
'stevearc/dressing.nvim',
|
||||
'jakewvincent/mkdnflow.nvim',
|
||||
dependencies = 'nvim-lua/plenary.nvim',
|
||||
ft = 'markdown',
|
||||
opts = {},
|
||||
-- lazy = false,
|
||||
},
|
||||
{
|
||||
url = 'https://git.filnar.com/fiplox/neogruber.git',
|
||||
-- dir = '~/share/dev/neogruber.nvim/',
|
||||
lazy = false,
|
||||
-- event = 'VeryLazy'
|
||||
'glepnir/dbsession.nvim',
|
||||
cmd = { 'SessionSave', 'SessionDelete', 'SessionLoad' },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'numToStr/Comment.nvim',
|
||||
-- event = 'VeryLazy',
|
||||
keys = { 'gcc', { 'gc', mode = 'v' }, { 'gb', mode = 'v' } },
|
||||
opts = {
|
||||
-- -LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
---Line-comment keymap
|
||||
line = 'gc',
|
||||
---Block-comment keymap
|
||||
block = 'gb',
|
||||
},
|
||||
---LHS of extra mappings
|
||||
extra = {
|
||||
---Add comment on the line above
|
||||
above = 'gcO',
|
||||
---Add comment on the line below
|
||||
below = 'gco',
|
||||
---Add comment at the end of line
|
||||
eol = 'gca',
|
||||
},
|
||||
---Enable keybindings
|
||||
---NOTE: If given `false` then the plugin won't create any mappings
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = true,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = true,
|
||||
---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}`
|
||||
extended = false,
|
||||
},
|
||||
pre_hook = function(ctx)
|
||||
-- Only calculate commentstring for tsx filetypes
|
||||
if vim.bo.filetype == 'typescriptreact' then
|
||||
local U = require 'Comment.utils'
|
||||
|
||||
-- Determine whether to use linewise or blockwise commentstring
|
||||
local type = ctx.ctype == U.ctype.linewise and '__default' or '__multiline'
|
||||
|
||||
-- Determine the location where to calculate commentstring from
|
||||
local location = nil
|
||||
if ctx.ctype == U.ctype.blockwise then
|
||||
location = require('ts_context_commentstring.utils').get_cursor_location()
|
||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
location = require('ts_context_commentstring.utils')
|
||||
.get_visual_start_location()
|
||||
"stevearc/dressing.nvim",
|
||||
lazy = true,
|
||||
init = function()
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.ui.select = function(...)
|
||||
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||
return vim.ui.select(...)
|
||||
end
|
||||
|
||||
return require('ts_context_commentstring.internal').calculate_commentstring {
|
||||
key = type,
|
||||
location = location,
|
||||
}
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.ui.input = function(...)
|
||||
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||
return vim.ui.input(...)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
'NvChad/nvim-colorizer.lua',
|
||||
-- event = 'BufReadPre',
|
||||
cmd = 'ColorizerToggle',
|
||||
opts = {
|
||||
filetypes = { '*', '!lazy' },
|
||||
buftype = { '*', '!prompt', '!nofile' },
|
||||
user_default_options = {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes #ffffff
|
||||
names = false, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
AARRGGBB = false, -- 0xAARRGGBB hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
-- Available modes: foreground, background
|
||||
-- Available modes for `mode`: foreground, background, virtualtext
|
||||
-- mode = "background", -- Set the display mode.
|
||||
-- virtualtext = "■",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
cmd = 'Mason',
|
||||
opts = {
|
||||
settings = {
|
||||
ui = {
|
||||
border = 'rounded',
|
||||
icons = {
|
||||
package_installed = '◍',
|
||||
package_pending = '◍',
|
||||
package_uninstalled = '◍',
|
||||
},
|
||||
},
|
||||
-- log_level = vim.log.levels.INFO,
|
||||
max_concurrent_installers = 4,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'NeogitOrg/neogit',
|
||||
dependencies = 'sindrets/diffview.nvim',
|
||||
cmd = 'Neogit',
|
||||
opts = {
|
||||
disable_signs = false,
|
||||
disable_hint = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_commit_confirmation = true,
|
||||
-- Neogit refreshes its internal state after specific events, which can be expensive depending on the repository size.
|
||||
-- Disabling `auto_refresh` will make it so you have to manually refresh the status after you open it.
|
||||
auto_refresh = true,
|
||||
disable_builtin_notifications = false,
|
||||
use_magit_keybindings = false,
|
||||
-- Change the default way of opening neogit
|
||||
kind = 'tab',
|
||||
-- The time after which an output console is shown for slow running commands
|
||||
console_timeout = 2000,
|
||||
-- Automatically show console if a command takes more than console_timeout milliseconds
|
||||
auto_show_console = true,
|
||||
-- Change the default way of opening the commit popup
|
||||
commit_popup = {
|
||||
kind = 'split',
|
||||
},
|
||||
-- Change the default way of opening popups
|
||||
popup = {
|
||||
kind = 'split',
|
||||
},
|
||||
status = {
|
||||
recent_commit_count = 50,
|
||||
},
|
||||
-- customize displayed signs
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { '>', 'v' },
|
||||
item = { '>', 'v' },
|
||||
hunk = { '', '' },
|
||||
},
|
||||
integrations = {
|
||||
-- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`.
|
||||
-- The diffview integration enables the diff popup, which is a wrapper around `sindrets/diffview.nvim`.
|
||||
--
|
||||
-- Requires you to have `sindrets/diffview.nvim` installed.
|
||||
diffview = true,
|
||||
},
|
||||
-- Setting any section to `false` will make the section not render at all
|
||||
section = {
|
||||
untracked = {
|
||||
folded = false,
|
||||
},
|
||||
unstaged = {
|
||||
folded = false,
|
||||
},
|
||||
staged = {
|
||||
folded = false,
|
||||
},
|
||||
stashes = {
|
||||
folded = true,
|
||||
},
|
||||
unpulled = {
|
||||
folded = true,
|
||||
},
|
||||
unmerged = {
|
||||
folded = false,
|
||||
},
|
||||
recent = {
|
||||
folded = true,
|
||||
},
|
||||
},
|
||||
-- override/add mappings
|
||||
mappings = {
|
||||
-- modify status buffer mappings
|
||||
status = {
|
||||
-- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
['B'] = 'BranchPopup',
|
||||
-- Removes the default mapping of "s"
|
||||
-- ['s'] = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'stevearc/oil.nvim',
|
||||
-- lazy = false,
|
||||
event = 'Syntax',
|
||||
opts = {
|
||||
columns = {
|
||||
"mtime",
|
||||
"size",
|
||||
"permissions",
|
||||
"icon",
|
||||
},
|
||||
-- Buffer-local options to use for oil buffers
|
||||
buf_options = {
|
||||
buflisted = false,
|
||||
},
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
wrap = false,
|
||||
signcolumn = "no",
|
||||
cursorcolumn = false,
|
||||
foldcolumn = "0",
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = 'nvic',
|
||||
},
|
||||
keymaps = {
|
||||
['g?'] = 'actions.show_help',
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = 'actions.select_vsplit',
|
||||
['<C-h>'] = 'actions.select_split',
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<TAB>'] = 'actions.preview',
|
||||
['<C-c>'] = 'actions.close',
|
||||
['q'] = 'actions.close',
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['-'] = 'actions.parent',
|
||||
['l'] = 'actions.parent',
|
||||
['_'] = 'actions.open_cwd',
|
||||
['`'] = 'actions.cd',
|
||||
['~'] = 'actions.tcd',
|
||||
['g.'] = 'actions.toggle_hidden',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
cmd = 'ToggleTerm',
|
||||
opts = {
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
-- size = function(term)
|
||||
-- if term.direction == 'horizontal' then
|
||||
-- return 15
|
||||
-- elseif term.direction == 'vertical' then
|
||||
-- return vim.o.columns * 0.4
|
||||
-- end
|
||||
-- end,
|
||||
shade_filetypes = { 'none', 'fzf' },
|
||||
-- open_mapping = [[<home>]],
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_terminals = true,
|
||||
shading_factor = '2', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
persist_size = true,
|
||||
-- direction = 'horizontal', -- 'vertical' | 'horizontal' | 'window' | 'float',
|
||||
direction = 'float', -- 'vertical' | 'horizontal' | 'window' | 'float',
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
-- The border key is *almost* the same as 'nvim_win_open'
|
||||
-- see :h nvim_win_open for details on borders however
|
||||
-- the 'curved' border is a custom border type
|
||||
-- not natively supported but implemented in this plugin.
|
||||
border = 'curved', -- | 'double' | 'shadow' | 'curved' --| ... other options supported by win open
|
||||
-- width = 100,
|
||||
-- height = 30,
|
||||
-- winblend = 20,
|
||||
-- highlights = {
|
||||
-- border = 'Normal',
|
||||
-- background = 'Normal',
|
||||
-- },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
-- lazy = false,
|
||||
-- dependencies = { 'nvim-treesitter/playground' },
|
||||
-- dependencies = 'windwp/nvim-ts-autotag',
|
||||
event = 'VeryLazy',
|
||||
config = function()
|
||||
require('nvim-treesitter.parsers').get_parser_configs().asm = {
|
||||
install_info = {
|
||||
url = 'https://github.com/rush-rs/tree-sitter-asm.git',
|
||||
files = { 'src/parser.c' },
|
||||
branch = 'main',
|
||||
},
|
||||
}
|
||||
local configs = require 'nvim-treesitter.configs'
|
||||
|
||||
configs.setup {
|
||||
ignore_install = { 'haskell' },
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { 'html' },
|
||||
},
|
||||
-- context_commentstring = { enable = true, config = { css = '// %s' } },
|
||||
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
|
||||
-- TODO seems to be broken
|
||||
indent = { enable = true, disable = { 'python', 'css' } },
|
||||
-- autotag = { enable = true },
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'j-morano/buffer_manager.nvim',
|
||||
opts = {
|
||||
-- line_keys = '', -- deactivate line keybindings
|
||||
|
||||
focus_alternate_buffer = true,
|
||||
select_menu_item_commands = {
|
||||
edit = {
|
||||
key = '<CR>',
|
||||
command = 'edit',
|
||||
},
|
||||
v = {
|
||||
key = '<C-v>',
|
||||
command = 'vsplit',
|
||||
},
|
||||
h = {
|
||||
key = '<C-h>',
|
||||
command = 'split',
|
||||
},
|
||||
},
|
||||
width = 0.6,
|
||||
},
|
||||
},
|
||||
{
|
||||
"ecthelionvi/NeoSwap.nvim",
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
'sakhnik/nvim-gdb'
|
||||
},
|
||||
}
|
||||
|
44
lua/plugins/lsp.lua
Normal file
44
lua/plugins/lsp.lua
Normal file
@ -0,0 +1,44 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
name = 'lsp',
|
||||
ft = 'java',
|
||||
dependencies = { 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim' },
|
||||
opts = {
|
||||
-- options for vim.diagnostic.config()
|
||||
diagnostics = {
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
signs = false,
|
||||
virtual_text = {
|
||||
source = "if_many",
|
||||
prefix = "●",
|
||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||
-- prefix = "icons",
|
||||
},
|
||||
float = {
|
||||
focusable = false,
|
||||
-- style = 'minimal',
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
severity_sort = true,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
|
||||
-- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
-- border = 'rounded',
|
||||
-- })
|
||||
-- vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
-- border = 'rounded',
|
||||
-- })
|
||||
local on_references = vim.lsp.handlers['textDocument/references']
|
||||
vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, {
|
||||
-- Use location list instead of quickfix list
|
||||
loclist = true,
|
||||
})
|
||||
end
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
name = 'lsp',
|
||||
config = function()
|
||||
require('mason')
|
||||
require('mason-lspconfig')
|
||||
vim.diagnostic.config(require('config.utils').lsp_config)
|
||||
-- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
-- border = 'rounded',
|
||||
-- })
|
||||
-- vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
-- border = 'rounded',
|
||||
-- })
|
||||
local on_references = vim.lsp.handlers['textDocument/references']
|
||||
vim.lsp.handlers['textDocument/references'] = vim.lsp.with(on_references, {
|
||||
-- Use location list instead of quickfix list
|
||||
loclist = true,
|
||||
})
|
||||
end
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
return {
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
config = function()
|
||||
local cmp_nvim_lsp = require 'cmp_nvim_lsp'
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
local lspconfig = require 'lspconfig'
|
||||
local function on_attach(client, bufnr)
|
||||
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
||||
if client.name == 'jdtls' or client.name == 'jdt.ls' then
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
vim.lsp.codelens.refresh()
|
||||
if JAVA_DAP_ACTIVE then
|
||||
require('jdtls').setup_dap { hotcodereplace = 'auto' }
|
||||
require('jdtls.setup').add_commands()
|
||||
require('jdtls.dap').setup_dap_main_class_configs()
|
||||
end
|
||||
end
|
||||
-- -- util.info(client.name .. " " .. (enable and "yes" or "no"), "format")
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
-- client.server_capabilities.documentFormattingProvider = true
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
|
||||
require('mason-lspconfig').setup_handlers {
|
||||
function(server_name) -- default handler (optional)
|
||||
lspconfig[server_name].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end,
|
||||
['clangd'] = function()
|
||||
local clangd_flags = {
|
||||
'-j=5',
|
||||
'--all-scopes-completion',
|
||||
'--suggest-missing-includes',
|
||||
'--background-index',
|
||||
'--pch-storage=disk',
|
||||
'--cross-file-rename',
|
||||
'--log=info',
|
||||
'--completion-style=detailed',
|
||||
'--enable-config', -- clangd 11+ supports reading from .clangd configuration file
|
||||
'--clang-tidy',
|
||||
-- "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type",
|
||||
-- "--fallback-style=Google",
|
||||
-- "--header-insertion=never",
|
||||
-- "--query-driver=<list-of-white-listed-complers>"
|
||||
}
|
||||
lspconfig.clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
arg = {
|
||||
unpack(clangd_flags)
|
||||
}
|
||||
}
|
||||
end,
|
||||
['lua_ls'] = function()
|
||||
lspconfig.lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
-- workspace = {
|
||||
-- library = {
|
||||
-- [vim.fn.expand '$VIMRUNTIME/lua'] = true,
|
||||
-- [vim.fn.stdpath 'config' .. '/lua'] = true,
|
||||
-- },
|
||||
-- },
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
['jdtls'] = function()
|
||||
end,
|
||||
['rust_analyzer'] = function()
|
||||
require('rust-tools').setup {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
standalone = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
end
|
||||
}
|
||||
-- if server == 'elixirls' then
|
||||
-- local elixir_opts = {
|
||||
-- cmd = { "/home/user/.local/share/nvim/mason/packages/elixir-ls/language_server.sh" },
|
||||
-- }
|
||||
-- opts = vim.tbl_deep_extend('force', elixir_opts, opts)
|
||||
-- end
|
164
lua/plugins/mason.lua
Normal file
164
lua/plugins/mason.lua
Normal file
@ -0,0 +1,164 @@
|
||||
return {
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
cmd = 'Mason',
|
||||
opts = {
|
||||
settings = {
|
||||
ui = {
|
||||
border = 'rounded',
|
||||
icons = {
|
||||
package_installed = '◍',
|
||||
package_pending = '◍',
|
||||
package_uninstalled = '◍',
|
||||
},
|
||||
},
|
||||
-- log_level = vim.log.levels.INFO,
|
||||
max_concurrent_installers = 4,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
opts = {
|
||||
ensure_installed = { 'javatest', 'javadbg', 'codelldb' },
|
||||
handlers = {
|
||||
function(config)
|
||||
-- all sources with no handler get passed here
|
||||
|
||||
-- Keep original functionality
|
||||
require('mason-nvim-dap').default_setup(config)
|
||||
end,
|
||||
-- python = function(config)
|
||||
-- config.adapters = {
|
||||
-- type = "executable",
|
||||
-- command = "/usr/bin/python3",
|
||||
-- args = {
|
||||
-- "-m",
|
||||
-- "debugpy.adapter",
|
||||
-- },
|
||||
-- }
|
||||
-- require('mason-nvim-dap').default_setup(config) -- don't forget this!
|
||||
-- end,
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
dependencies = { 'jay-babu/mason-nvim-dap.nvim', 'rcarriga/nvim-dap-ui' },
|
||||
config = function()
|
||||
local cmp_nvim_lsp = require 'cmp_nvim_lsp'
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
local lspconfig = require 'lspconfig'
|
||||
capabilities.textDocument.completion.completionItem = {
|
||||
documentationFormat = { "markdown", "plaintext" },
|
||||
snippetSupport = true,
|
||||
preselectSupport = true,
|
||||
insertReplaceSupport = true,
|
||||
labelDetailsSupport = true,
|
||||
deprecatedSupport = true,
|
||||
commitCharactersSupport = true,
|
||||
tagSupport = { valueSet = { 1 } },
|
||||
resolveSupport = {
|
||||
properties = {
|
||||
"documentation",
|
||||
"detail",
|
||||
"additionalTextEdits",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
--[[ vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') ]]
|
||||
if client.name == 'jdtls' or client.name == 'jdt.ls' then
|
||||
-- client.server_capabilities.documentFormattingProvider = false
|
||||
vim.lsp.codelens.refresh()
|
||||
if JAVA_DAP_ACTIVE then
|
||||
require('jdtls').setup_dap { hotcodereplace = 'auto' }
|
||||
require('jdtls.setup').add_commands()
|
||||
require('jdtls.dap').setup_dap_main_class_configs()
|
||||
end
|
||||
end
|
||||
-- -- util.info(client.name .. " " .. (enable and "yes" or "no"), "format")
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
-- client.server_capabilities.documentFormattingProvider = true
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
|
||||
require('mason-lspconfig').setup_handlers {
|
||||
function(server_name) -- default handler (optional)
|
||||
lspconfig[server_name].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end,
|
||||
['clangd'] = function()
|
||||
local clangd_flags = {
|
||||
'-j=5',
|
||||
'--all-scopes-completion',
|
||||
'--suggest-missing-includes',
|
||||
'--background-index',
|
||||
'--pch-storage=disk',
|
||||
'--cross-file-rename',
|
||||
'--log=info',
|
||||
'--completion-style=detailed',
|
||||
'--enable-config', -- clangd 11+ supports reading from .clangd configuration file
|
||||
'--clang-tidy',
|
||||
-- "--clang-tidy-checks=-*,llvm-*,clang-analyzer-*,modernize-*,-modernize-use-trailing-return-type",
|
||||
-- "--fallback-style=Google",
|
||||
-- "--header-insertion=never",
|
||||
-- "--query-driver=<list-of-white-listed-complers>"
|
||||
}
|
||||
lspconfig.clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
arg = {
|
||||
unpack(clangd_flags)
|
||||
}
|
||||
}
|
||||
end,
|
||||
['html'] = function()
|
||||
lspconfig.html.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "html", "jsp" },
|
||||
}
|
||||
end,
|
||||
['lua_ls'] = function()
|
||||
lspconfig.lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
-- workspace = {
|
||||
-- library = {
|
||||
-- [vim.fn.expand '$VIMRUNTIME/lua'] = true,
|
||||
-- [vim.fn.stdpath 'config' .. '/lua'] = true,
|
||||
-- },
|
||||
-- },
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
['jdtls'] = function()
|
||||
end,
|
||||
['rust_analyzer'] = function()
|
||||
require('rust-tools').setup {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
standalone = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
81
lua/plugins/neogit.lua
Normal file
81
lua/plugins/neogit.lua
Normal file
@ -0,0 +1,81 @@
|
||||
return {
|
||||
'NeogitOrg/neogit',
|
||||
dependencies = 'sindrets/diffview.nvim',
|
||||
cmd = 'Neogit',
|
||||
opts = {
|
||||
disable_signs = false,
|
||||
disable_hint = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_commit_confirmation = true,
|
||||
-- Neogit refreshes its internal state after specific events, which can be expensive depending on the repository size.
|
||||
-- Disabling `auto_refresh` will make it so you have to manually refresh the status after you open it.
|
||||
auto_refresh = true,
|
||||
disable_builtin_notifications = false,
|
||||
use_magit_keybindings = false,
|
||||
-- Change the default way of opening neogit
|
||||
kind = 'tab',
|
||||
-- The time after which an output console is shown for slow running commands
|
||||
console_timeout = 2000,
|
||||
-- Automatically show console if a command takes more than console_timeout milliseconds
|
||||
auto_show_console = true,
|
||||
-- Change the default way of opening the commit popup
|
||||
commit_popup = {
|
||||
kind = 'split',
|
||||
},
|
||||
-- Change the default way of opening popups
|
||||
popup = {
|
||||
kind = 'split',
|
||||
},
|
||||
status = {
|
||||
recent_commit_count = 50,
|
||||
},
|
||||
-- customize displayed signs
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { '>', 'v' },
|
||||
item = { '>', 'v' },
|
||||
hunk = { '', '' },
|
||||
},
|
||||
integrations = {
|
||||
-- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`.
|
||||
-- The diffview integration enables the diff popup, which is a wrapper around `sindrets/diffview.nvim`.
|
||||
--
|
||||
-- Requires you to have `sindrets/diffview.nvim` installed.
|
||||
diffview = true,
|
||||
},
|
||||
-- Setting any section to `false` will make the section not render at all
|
||||
section = {
|
||||
untracked = {
|
||||
folded = false,
|
||||
},
|
||||
unstaged = {
|
||||
folded = false,
|
||||
},
|
||||
staged = {
|
||||
folded = false,
|
||||
},
|
||||
stashes = {
|
||||
folded = true,
|
||||
},
|
||||
unpulled = {
|
||||
folded = true,
|
||||
},
|
||||
unmerged = {
|
||||
folded = false,
|
||||
},
|
||||
recent = {
|
||||
folded = true,
|
||||
},
|
||||
},
|
||||
-- override/add mappings
|
||||
-- mappings = {
|
||||
-- -- modify status buffer mappings
|
||||
-- status = {
|
||||
-- -- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
-- ['B'] = 'BranchPopup',
|
||||
-- -- Removes the default mapping of "s"
|
||||
-- -- ['s'] = '',
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
}
|
45
lua/plugins/oil.lua
Normal file
45
lua/plugins/oil.lua
Normal file
@ -0,0 +1,45 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
-- lazy = false,
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
columns = {
|
||||
"mtime",
|
||||
"size",
|
||||
"permissions",
|
||||
"icon",
|
||||
},
|
||||
-- Buffer-local options to use for oil buffers
|
||||
buf_options = {
|
||||
buflisted = false,
|
||||
},
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
wrap = false,
|
||||
signcolumn = "no",
|
||||
cursorcolumn = false,
|
||||
foldcolumn = "0",
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = 'nvic',
|
||||
},
|
||||
keymaps = {
|
||||
['g?'] = 'actions.show_help',
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = 'actions.select_vsplit',
|
||||
['<C-h>'] = 'actions.select_split',
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<TAB>'] = 'actions.preview',
|
||||
['<C-c>'] = 'actions.close',
|
||||
['q'] = 'actions.close',
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['-'] = 'actions.parent',
|
||||
['l'] = 'actions.parent',
|
||||
['_'] = 'actions.open_cwd',
|
||||
['`'] = 'actions.cd',
|
||||
['~'] = 'actions.tcd',
|
||||
['g.'] = 'actions.toggle_hidden',
|
||||
},
|
||||
},
|
||||
}
|
159
lua/plugins/theme.lua
Normal file
159
lua/plugins/theme.lua
Normal file
@ -0,0 +1,159 @@
|
||||
local l = false
|
||||
return {
|
||||
{
|
||||
-- url = 'https://git.filnar.com/fiplox/neogruber.git',
|
||||
dir = '~/dev/home/neogruber.nvim/',
|
||||
lazy = false,
|
||||
opts = {
|
||||
transparent = true,
|
||||
light = l,
|
||||
}
|
||||
-- event = 'VeryLazy'
|
||||
},
|
||||
-- {
|
||||
-- "Mofiqul/adwaita.nvim",
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
-- -- configure and set on startup
|
||||
-- config = function()
|
||||
-- vim.g.adwaita_darker = false -- for darker version
|
||||
-- vim.g.adwaita_disable_cursorline = false -- to disable cursorline
|
||||
-- vim.g.adwaita_transparent = true -- makes the background transparent
|
||||
-- -- vim.cmd('colorscheme adwaita')
|
||||
-- end
|
||||
-- },
|
||||
{
|
||||
'freddiehaddad/feline.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
local feline = require 'feline'
|
||||
local utils = require 'config.utils'
|
||||
local c = utils.feline_c
|
||||
local theme
|
||||
if l then
|
||||
theme = utils.feline_theme_light
|
||||
else
|
||||
theme = utils.feline_theme_dark
|
||||
end
|
||||
local vi_mode_colors = utils.feline_vi_mode_colors
|
||||
|
||||
local left = {
|
||||
c.vim_mode,
|
||||
-- c.gitBranch,
|
||||
-- c.gitDiffAdded,
|
||||
-- c.gitDiffRemoved,
|
||||
-- c.gitDiffChanged,
|
||||
c.file_info,
|
||||
c.right_separator,
|
||||
c.lsp_client_names,
|
||||
c.diagnostic_errors,
|
||||
c.diagnostic_warnings,
|
||||
c.diagnostic_info,
|
||||
c.diagnostic_hints,
|
||||
}
|
||||
|
||||
-- local middle = {
|
||||
-- c.separator,
|
||||
-- }
|
||||
|
||||
local right = {
|
||||
c.file_type,
|
||||
c.search_count,
|
||||
c.macro,
|
||||
c.file_encoding,
|
||||
-- c.startup,
|
||||
c.line_percentage,
|
||||
c.select_count,
|
||||
c.position,
|
||||
}
|
||||
|
||||
local components = {
|
||||
active = {
|
||||
left,
|
||||
-- middle,
|
||||
right,
|
||||
},
|
||||
inactive = {
|
||||
left,
|
||||
-- middle,
|
||||
right,
|
||||
},
|
||||
}
|
||||
|
||||
feline.setup {
|
||||
components = components,
|
||||
theme = theme,
|
||||
vi_mode_colors = vi_mode_colors,
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- 'nvim-lualine/lualine.nvim',
|
||||
-- dependencies = { 'nvim-tree/nvim-web-devicons', 'nvim-lua/lsp-status.nvim' },
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- theme = "adwaita"
|
||||
-- },
|
||||
-- sections = {
|
||||
-- lualine_a = { 'mode' },
|
||||
-- lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
-- lualine_c = { 'filename', "require'lsp-status'.status()" },
|
||||
-- lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
-- lualine_y = { 'progress' },
|
||||
-- lualine_z = { 'location' }
|
||||
-- },
|
||||
-- inactive_sections = {
|
||||
-- lualine_a = {},
|
||||
-- lualine_b = {},
|
||||
-- lualine_c = { 'filename', "require'lsp-status'.status()" },
|
||||
-- lualine_x = { 'location' },
|
||||
-- lualine_y = {},
|
||||
-- lualine_z = {}
|
||||
-- },
|
||||
-- tabline = {},
|
||||
-- winbar = {},
|
||||
-- inactive_winbar = {},
|
||||
-- extensions = {}
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- 'nvimdev/dashboard-nvim',
|
||||
-- event = 'VimEnter',
|
||||
-- opts = {
|
||||
-- -- theme = 'doom',
|
||||
-- theme = 'hyper',
|
||||
-- shortcut_type = 'number',
|
||||
-- config = {
|
||||
-- shortcut = {
|
||||
-- -- action can be a function type
|
||||
-- {
|
||||
-- desc = "Files",
|
||||
-- group = '',
|
||||
-- key = 'f',
|
||||
-- action = 'edit .'
|
||||
-- },
|
||||
-- },
|
||||
-- packages = { enable = false }, -- show how many plugins neovim loaded
|
||||
-- -- limit how many projects list, action when you press key or enter it will run this action.
|
||||
-- -- action can be a functino type, e.g.
|
||||
-- -- action = func(path) vim.cmd('Telescope find_files cwd=' .. path) end
|
||||
-- project = {
|
||||
-- enable = true,
|
||||
-- limit = 8,
|
||||
-- -- icon = ' ',
|
||||
-- label = '',
|
||||
-- action = 'edit'
|
||||
-- },
|
||||
-- mru = {
|
||||
-- limit = 10,
|
||||
-- -- icon = 'your icon',
|
||||
-- label = '',
|
||||
-- },
|
||||
-- footer = {}, -- footer
|
||||
-- }
|
||||
-- },
|
||||
-- dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
||||
-- },
|
||||
}
|
41
lua/plugins/toggleterm.lua
Normal file
41
lua/plugins/toggleterm.lua
Normal file
@ -0,0 +1,41 @@
|
||||
return {
|
||||
'akinsho/toggleterm.nvim',
|
||||
cmd = 'ToggleTerm',
|
||||
opts = {
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
-- size = function(term)
|
||||
-- if term.direction == 'horizontal' then
|
||||
-- return 15
|
||||
-- elseif term.direction == 'vertical' then
|
||||
-- return vim.o.columns * 0.4
|
||||
-- end
|
||||
-- end,
|
||||
shade_filetypes = { 'none', 'fzf' },
|
||||
-- open_mapping = [[<home>]],
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_terminals = true,
|
||||
shading_factor = '2', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
persist_size = true,
|
||||
-- direction = 'horizontal', -- 'vertical' | 'horizontal' | 'window' | 'float',
|
||||
direction = 'float', -- 'vertical' | 'horizontal' | 'window' | 'float',
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
-- The border key is *almost* the same as 'nvim_win_open'
|
||||
-- see :h nvim_win_open for details on borders however
|
||||
-- the 'curved' border is a custom border type
|
||||
-- not natively supported but implemented in this plugin.
|
||||
border = 'curved', -- | 'double' | 'shadow' | 'curved' --| ... other options supported by win open
|
||||
-- width = 100,
|
||||
-- height = 30,
|
||||
-- winblend = 20,
|
||||
-- highlights = {
|
||||
-- border = 'Normal',
|
||||
-- background = 'Normal',
|
||||
-- },
|
||||
},
|
||||
},
|
||||
}
|
34
lua/plugins/treesitter.lua
Normal file
34
lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,34 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
-- lazy = false,
|
||||
-- dependencies = { 'nvim-treesitter/playground' },
|
||||
-- dependencies = 'windwp/nvim-ts-autotag',
|
||||
event = 'VeryLazy',
|
||||
init = function(plugin)
|
||||
require("lazy.core.loader").add_to_rtp(plugin)
|
||||
require("nvim-treesitter.query_predicates")
|
||||
end,
|
||||
config = function()
|
||||
require('nvim-treesitter.parsers').get_parser_configs().asm = {
|
||||
install_info = {
|
||||
url = 'https://github.com/rush-rs/tree-sitter-asm.git',
|
||||
files = { 'src/parser.c' },
|
||||
branch = 'main',
|
||||
},
|
||||
}
|
||||
local configs = require 'nvim-treesitter.configs'
|
||||
|
||||
configs.setup {
|
||||
ignore_install = { 'haskell' },
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { 'html' },
|
||||
},
|
||||
-- context_commentstring = { enable = true, config = { css = '// %s' } },
|
||||
-- indent = {enable = true, disable = {"python", "html", "javascript"}},
|
||||
-- TODO seems to be broken
|
||||
indent = { enable = true, disable = { 'python', 'css' } },
|
||||
-- autotag = { enable = true },
|
||||
}
|
||||
end,
|
||||
}
|
@ -41,6 +41,7 @@ return {
|
||||
auto_preview = false, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
|
||||
auto_fold = false, -- automatically fold a file trouble list at creation
|
||||
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
|
||||
include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" }, -- for the given modes, include the declaration of the current symbol in the results
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "",
|
||||
|
13
lua/plugins/wildcat.lua
Normal file
13
lua/plugins/wildcat.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
'javiorfo/nvim-wildcat',
|
||||
lazy = true,
|
||||
cmd = { "WildcatRun" },
|
||||
dependencies = { 'javiorfo/nvim-popcorn' },
|
||||
opts = {
|
||||
tomcat = {
|
||||
home = "/home/fiplox/Software/apache-tomcat-10.1.13/",
|
||||
app_base = "webapps",
|
||||
default = true
|
||||
}
|
||||
}
|
||||
}
|
2
spell/fr.utf-8.add
Normal file
2
spell/fr.utf-8.add
Normal file
@ -0,0 +1,2 @@
|
||||
#synchronisme/!
|
||||
Asynchronisme/!
|
BIN
spell/fr.utf-8.add.spl
Normal file
BIN
spell/fr.utf-8.add.spl
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user