1
0
Fork 0

Compare commits

..

No commits in common. "0a09eb154065ec758240d6ee7b0ea272e218f998" and "d990c08976abf45dddfbde9133d6c9df8a9bd4af" have entirely different histories.

14 changed files with 136 additions and 84 deletions

View file

@ -6,7 +6,7 @@ local workspace_dir = home .. '/.local/share/eclipse/' .. vim.fn.fnamemodify(roo
local config = {
cmd = {
'jdtls',
'-data', workspace_dir,
'-data', workspace_dir
},
root_dir = require('jdtls.setup').find_root(root_markers),
settings = {
@ -14,13 +14,12 @@ local config = {
},
init_options = {
bundles = {
require('mason-core.path').package_prefix('java-debug-adapter') ..
'/extension/server/com.microsoft.java.debug.plugin-0.46.0.jar',
require('mason-core.path').package_prefix('java-debug-adapter')..'/extension/server/com.microsoft.java.debug.plugin-0.46.0.jar',
},
},
on_attach = function()
on_attach = function(client, buf)
local jdtls = require('jdtls')
jdtls.setup_dap({ hotcodereplace = 'auto', config_overrides = {} })
jdtls.setup_dap({ hotcodereplace = 'auto' })
end,
}
require('jdtls').start_or_attach(config)

View file

@ -1 +0,0 @@
setlocal tabstop=2 shiftwidth=2

View file

@ -0,0 +1,5 @@
autocmd BufRead,BufNewFile Directory.Build.props set ft=xml
autocmd BufRead,BufNewFile Directory.Build.targets set ft=xml
autocmd BufRead,BufNewFile *.axaml set ft=xml
autocmd BufRead,BufNewFile *.xaml set ft=xml
autocmd BufRead,BufNewFile *.cake set filetype=cs

View file

@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.env set ft=env

View file

@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.tpl setlocal filetype=html.latte

View file

@ -27,4 +27,3 @@ require('lazy').setup(
require('configs.misc').setup()
require('configs.keys').setup()
require('configs.filetypes').setup()

View file

@ -1,21 +0,0 @@
local M = {}
function M.setup()
vim.filetype.add({
extension = {
templ = 'templ',
env = 'env',
tpl = 'html.latte',
axaml = 'xml',
xaml = 'xml',
cake = 'cs'
},
filename = {
['Directory.Build.props'] = 'xml',
['Directory.Build.targets'] = 'xml',
}
})
end
return M

View file

@ -101,12 +101,12 @@ function M.setup()
if bo.filetype == 'help' and bo.buftype ~= 'help' then
return
end
bo.buflisted = false
vim.bo[buf].buflisted = false
vim.opt_local.number = false
vim.opt_local.signcolumn = 'no'
vim.keymap.set('n', 'q', '<Cmd>:q<CR>', { buffer = buf })
if bo.filetype ~= 'qf' then
if vim.bo[buf].filetype ~= 'qf' then
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
end
@ -114,6 +114,21 @@ function M.setup()
end,
})
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, {
pattern = { 'Trouble' },
callback = function(args)
local opts = require('trouble.config').options
local words = vim.split(opts.mode, '[%W]', {})
for i, word in ipairs(words) do
words[i] = word:sub(1, 1):upper() .. word:sub(2)
end
vim.b[args.buf].trouble_mode = table.concat(words, ' ')
vim.opt_local.statusline = '%Y [%{b:trouble_mode}]%=%P'
end,
})
vim.diagnostic.config({
virtual_text = false
-- virtual_text = {

View file

@ -79,11 +79,42 @@ function M.config()
link('@variable', 'Identifier')
end -- }}}
local function normalizeTroubleHighlight() -- {{{
copyFg('TroubleText', 'Normal')
copyFg('TroubleFoldIcon', 'CursorLineNr')
copyFg('TroubleLocation', 'LineNr')
copyFg('TroubleIndent', 'LineNr')
copyFg('TroubleSignInformation', 'DiagnosticSignInfo')
-- TroubleCount xxx links to TabLineSel
-- copyFg('TroubleError', 'DiagnosticError')
link('TroubleSignError', 'DiagnosticError')
link('TroubleSignWarning', 'DiagnosticWarn')
link('TroubleSignHint', 'DiagnosticHint')
vim.api.nvim_set_hl(0, 'TroubleNormal', {})
end -- }}}
local function customLinks()
copyFg('Function', 'Normal')
copyFg('Operator', 'Normal')
end
local troublegr = vim.api.nvim_create_augroup('TroubleCursorline', { clear = true })
vim.api.nvim_create_autocmd('WinEnter', {
group = troublegr,
pattern = '*Trouble',
callback = function()
vim.wo.cursorline = true
end,
})
vim.api.nvim_create_autocmd('WinLeave', {
group = troublegr,
pattern = '*Trouble',
callback = function()
vim.wo.cursorline = false
end,
})
local augr = vim.api.nvim_create_augroup('config_colorscheme', {});
vim.api.nvim_create_autocmd('Colorscheme', {
group = augr,
@ -93,6 +124,7 @@ function M.config()
customLinks()
normalizeTerminal()
normalizeCmpKindHighlight()
normalizeTroubleHighlight()
end,
})

View file

@ -11,7 +11,6 @@ local server_configs = function()
-- perlls = {},
cssls = {},
html = {},
htmx = {},
lemminx = {
--{{{
settings = {
@ -191,10 +190,9 @@ local function on_attach(args) -- {{{
floating_window_above_cur_line = false, -- Attempt to float the popup above the cursor position
-- (note, if the height of the float would be greater than the space left above the cursor, it will default
-- to placing the float below the cursor. The max_height option allows for finer tuning of this)
silent = true,
},
silent = true,
display_automatically = true,
silent = true,
keymaps = {
next_signature = '<M-j>',
previous_signature = '<M-k>',
@ -225,7 +223,7 @@ local function on_attach(args) -- {{{
vim.keymap.set('n', '<leader>cci', vim.lsp.buf.incoming_calls, mkOpts('LSP incoming calls'))
vim.keymap.set('n', '<leader>cco', vim.lsp.buf.outgoing_calls, mkOpts('LSP outgoing calls'))
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, mkOpts('LSP references'))
vim.keymap.set('n', '<leader>cr', vim.lsp.buf.references, mkOpts('LSP references'))
vim.keymap.set('n', '<leader>cr', '<Cmd>Trouble lsp_references<CR>', mkOpts('LSP references'))
vim.keymap.set('n', '<leader>cs', '<Cmd>Telescope lsp_document_symbols<CR>', mkOpts('LSP document symbols'))
-- fix omnisharp {{{
@ -364,7 +362,7 @@ return {
config = config,
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
dependencies = {
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
{ 'folke/neodev.nvim', config = true },
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
{
'ray-x/lsp_signature.nvim',

View file

@ -70,22 +70,22 @@ return {
keys = {
{
'ii',
function() require('various-textobjs').indentation('inner', 'inner', 'withBlanks') end,
function() require('various-textobjs').indentation(true, true) end,
mode = { 'o', 'x' },
desc =
'Inside indent',
},
{
'ai',
function() require('various-textobjs').indentation('outer', 'outer', 'withBlanks') end,
function() require('various-textobjs').indentation(false, false) end,
mode = { 'o', 'x' },
desc =
'Around indent',
},
-- { 'iI', function() require('various-textobjs').indentation(true, true) end, mode = { 'o', 'x' }, desc = '' },
-- { 'aI', function() require('various-textobjs').indentation(false, false) end, mode = { 'o', 'x' }, desc = '' },
{ 'iS', function() require('various-textobjs').subword('inner') end, mode = { 'o', 'x' }, desc = '' },
{ 'aS', function() require('various-textobjs').subword('outer') end, mode = { 'o', 'x' }, desc = '' },
{ 'iS', function() require('various-textobjs').subword(true) end, mode = { 'o', 'x' }, desc = '' },
{ 'aS', function() require('various-textobjs').subword(false) end, mode = { 'o', 'x' }, desc = '' },
{ '|', function() require('various-textobjs').column() end, mode = { 'o', 'x' }, desc = '' },
{ 'L', function() require('various-textobjs').url() end, mode = { 'o', 'x' }, desc = '' },
-- {"YOUR_MAPPING",function() require("various-textobjs").toNextClosingBracket() end, mode = { "o", "x" }, desc = "" },
@ -194,7 +194,7 @@ return {
local lines = require('lsp_lines')
lines.setup()
vim.diagnostic.config({
virtual_lines = function(_, bufnr)
virtual_lines = function(ns, bufnr)
local ft = vim.api.nvim_get_option_value('filetype', { buf = bufnr })
if ft == 'lazy' then
return false
@ -249,33 +249,30 @@ return {
{ 'williamboman/mason.nvim', cmd = 'Mason', config = true },
{
'yorickpeterse/nvim-pqf',
opts = {
signs = {
error = { text = 'E', hl = 'DiagnosticSignError' },
warning = { text = 'W', hl = 'DiagnosticSignWarn' },
info = { text = 'I', hl = 'DiagnosticSignInfo' },
hint = { text = 'H', hl = 'DiagnosticSignHint' },
},
-- By default, only the first line of a multi line message will be shown.
-- When this is true, multiple lines will be shown for an entry, separated by
-- a space
show_multiple_lines = false,
-- How long filenames in the quickfix are allowed to be. 0 means no limit.
-- Filenames above this limit will be truncated from the beginning with
-- `filename_truncate_prefix`.
max_filename_length = 40,
-- Prefix to use for truncated filenames.
filename_truncate_prefix = '[...]',
},
'mfussenegger/nvim-jdtls',
ft = 'java',
},
{
'mfussenegger/nvim-jdtls',
ft = 'java',
'folke/trouble.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
lazy = true,
cmd = { 'Trouble', 'TroubleToggle' },
keys = {
{ '<Leader>tt', '<Cmd>TroubleToggle<CR>', desc = 'Trouble toggle' },
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle' },
},
opts = {
mode = 'document_diagnostics',
signs = {
-- icons / text used for a diagnostic
error = '󰅚',
warning = '󰀪',
hint = '󰌶',
information = '',
other = '',
},
},
},
{
@ -294,5 +291,4 @@ return {
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}
}
}}

View file

@ -2,13 +2,14 @@ return {
'folke/which-key.nvim',
config = function()
local wk = require('which-key')
wk.add({
{'<Space>f', group = 'file' },
{'<Space>g', group = 'git' },
{'<Space>l', group = 'LSP' },
{'<Space>d', group = 'Debug neovim' },
{'<Space>c', group = 'Code' },
{'<Space>cc', group = 'calls' },
wk.register({
['<Space>f'] = { name = '+file' },
['<Space>g'] = { name = '+git' },
['<Space>l'] = { name = '+LSP' },
['<Space>t'] = { name = '+Trouble' },
['<Space>d'] = { name = '+Debug neovim' },
['<Space>c'] = { name = '+Code' },
['<Space>cc'] = { name = '+calls' },
})
end,
}

View file

@ -53,8 +53,6 @@
memory_limit=-1
max_execution_time=0
max_input_time=-1
post_max_size=1G
upload_max_filesize=1G
xdebug.mode=debug
xdebug.output_dir=/tmp
xdebug.start_with_request=trigger

View file

@ -566,11 +566,40 @@ Regex=\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
RegexIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open mod
[wav22]
Shell=.waw22
ShellIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open wav22
[mp3]
Shell=.mp3
ShellIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open mp3
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view mp3
[ogg]
Regex=\.og[gax]$
RegexIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open ogg
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view ogg
[opus]
Shell=.opus
ShellIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open opus
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view opus
[midi]
Regex=\.(midi?|rmid?)$
RegexIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open midi
[wma]
Shell=.wma
ShellIgnoreCase=true
Open=/usr/lib/mc/ext.d/sound.sh open wma
View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view wma
# Play list
[playlist]
Regex=\.(m3u|pls)$