Compare commits
3 commits
d990c08976
...
0a09eb1540
Author | SHA1 | Date | |
---|---|---|---|
0a09eb1540 | |||
03572ec37b | |||
4185d1869c |
14 changed files with 84 additions and 136 deletions
|
@ -6,7 +6,7 @@ local workspace_dir = home .. '/.local/share/eclipse/' .. vim.fn.fnamemodify(roo
|
||||||
local config = {
|
local config = {
|
||||||
cmd = {
|
cmd = {
|
||||||
'jdtls',
|
'jdtls',
|
||||||
'-data', workspace_dir
|
'-data', workspace_dir,
|
||||||
},
|
},
|
||||||
root_dir = require('jdtls.setup').find_root(root_markers),
|
root_dir = require('jdtls.setup').find_root(root_markers),
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -14,12 +14,13 @@ local config = {
|
||||||
},
|
},
|
||||||
init_options = {
|
init_options = {
|
||||||
bundles = {
|
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(client, buf)
|
on_attach = function()
|
||||||
local jdtls = require('jdtls')
|
local jdtls = require('jdtls')
|
||||||
jdtls.setup_dap({ hotcodereplace = 'auto' })
|
jdtls.setup_dap({ hotcodereplace = 'auto', config_overrides = {} })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
require('jdtls').start_or_attach(config)
|
require('jdtls').start_or_attach(config)
|
||||||
|
|
1
dot_config/nvim/after/ftplugin/nix.vim
Normal file
1
dot_config/nvim/after/ftplugin/nix.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
setlocal tabstop=2 shiftwidth=2
|
|
@ -1,5 +0,0 @@
|
||||||
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
|
|
|
@ -1 +0,0 @@
|
||||||
autocmd BufRead,BufNewFile *.env set ft=env
|
|
|
@ -1 +0,0 @@
|
||||||
autocmd BufRead,BufNewFile *.tpl setlocal filetype=html.latte
|
|
|
@ -27,3 +27,4 @@ require('lazy').setup(
|
||||||
|
|
||||||
require('configs.misc').setup()
|
require('configs.misc').setup()
|
||||||
require('configs.keys').setup()
|
require('configs.keys').setup()
|
||||||
|
require('configs.filetypes').setup()
|
||||||
|
|
21
dot_config/nvim/lua/configs/filetypes.lua
Normal file
21
dot_config/nvim/lua/configs/filetypes.lua
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
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
|
|
@ -101,12 +101,12 @@ function M.setup()
|
||||||
if bo.filetype == 'help' and bo.buftype ~= 'help' then
|
if bo.filetype == 'help' and bo.buftype ~= 'help' then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
vim.bo[buf].buflisted = false
|
bo.buflisted = false
|
||||||
vim.opt_local.number = false
|
vim.opt_local.number = false
|
||||||
vim.opt_local.signcolumn = 'no'
|
vim.opt_local.signcolumn = 'no'
|
||||||
vim.keymap.set('n', 'q', '<Cmd>:q<CR>', { buffer = buf })
|
vim.keymap.set('n', 'q', '<Cmd>:q<CR>', { buffer = buf })
|
||||||
|
|
||||||
if vim.bo[buf].filetype ~= 'qf' then
|
if bo.filetype ~= 'qf' then
|
||||||
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
|
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -114,21 +114,6 @@ function M.setup()
|
||||||
end,
|
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({
|
vim.diagnostic.config({
|
||||||
virtual_text = false
|
virtual_text = false
|
||||||
-- virtual_text = {
|
-- virtual_text = {
|
||||||
|
|
|
@ -79,42 +79,11 @@ function M.config()
|
||||||
link('@variable', 'Identifier')
|
link('@variable', 'Identifier')
|
||||||
end -- }}}
|
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()
|
local function customLinks()
|
||||||
copyFg('Function', 'Normal')
|
copyFg('Function', 'Normal')
|
||||||
copyFg('Operator', 'Normal')
|
copyFg('Operator', 'Normal')
|
||||||
end
|
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', {});
|
local augr = vim.api.nvim_create_augroup('config_colorscheme', {});
|
||||||
vim.api.nvim_create_autocmd('Colorscheme', {
|
vim.api.nvim_create_autocmd('Colorscheme', {
|
||||||
group = augr,
|
group = augr,
|
||||||
|
@ -124,7 +93,6 @@ function M.config()
|
||||||
customLinks()
|
customLinks()
|
||||||
normalizeTerminal()
|
normalizeTerminal()
|
||||||
normalizeCmpKindHighlight()
|
normalizeCmpKindHighlight()
|
||||||
normalizeTroubleHighlight()
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ local server_configs = function()
|
||||||
-- perlls = {},
|
-- perlls = {},
|
||||||
cssls = {},
|
cssls = {},
|
||||||
html = {},
|
html = {},
|
||||||
|
htmx = {},
|
||||||
lemminx = {
|
lemminx = {
|
||||||
--{{{
|
--{{{
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -190,9 +191,10 @@ local function on_attach(args) -- {{{
|
||||||
floating_window_above_cur_line = false, -- Attempt to float the popup above the cursor position
|
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
|
-- (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)
|
-- to placing the float below the cursor. The max_height option allows for finer tuning of this)
|
||||||
},
|
|
||||||
display_automatically = true,
|
|
||||||
silent = true,
|
silent = true,
|
||||||
|
},
|
||||||
|
silent = true,
|
||||||
|
display_automatically = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
next_signature = '<M-j>',
|
next_signature = '<M-j>',
|
||||||
previous_signature = '<M-k>',
|
previous_signature = '<M-k>',
|
||||||
|
@ -223,7 +225,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>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', '<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', 'gr', 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>cr', vim.lsp.buf.references, mkOpts('LSP references'))
|
||||||
vim.keymap.set('n', '<leader>cs', '<Cmd>Telescope lsp_document_symbols<CR>', mkOpts('LSP document symbols'))
|
vim.keymap.set('n', '<leader>cs', '<Cmd>Telescope lsp_document_symbols<CR>', mkOpts('LSP document symbols'))
|
||||||
|
|
||||||
-- fix omnisharp {{{
|
-- fix omnisharp {{{
|
||||||
|
@ -362,7 +364,7 @@ return {
|
||||||
config = config,
|
config = config,
|
||||||
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
|
cmd = { 'LspInfo', 'LspLog', 'LspStart' },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ 'folke/neodev.nvim', config = true },
|
{ 'folke/neodev.nvim', config = true }, -- deprecated! use folke/lazydev.nvim
|
||||||
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
|
{ 'j-hui/fidget.nvim', config = true, tag = 'legacy' },
|
||||||
{
|
{
|
||||||
'ray-x/lsp_signature.nvim',
|
'ray-x/lsp_signature.nvim',
|
||||||
|
|
|
@ -70,22 +70,22 @@ return {
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
'ii',
|
'ii',
|
||||||
function() require('various-textobjs').indentation(true, true) end,
|
function() require('various-textobjs').indentation('inner', 'inner', 'withBlanks') end,
|
||||||
mode = { 'o', 'x' },
|
mode = { 'o', 'x' },
|
||||||
desc =
|
desc =
|
||||||
'Inside indent',
|
'Inside indent',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'ai',
|
'ai',
|
||||||
function() require('various-textobjs').indentation(false, false) end,
|
function() require('various-textobjs').indentation('outer', 'outer', 'withBlanks') end,
|
||||||
mode = { 'o', 'x' },
|
mode = { 'o', 'x' },
|
||||||
desc =
|
desc =
|
||||||
'Around indent',
|
'Around indent',
|
||||||
},
|
},
|
||||||
-- { 'iI', function() require('various-textobjs').indentation(true, true) end, mode = { 'o', 'x' }, desc = '' },
|
-- { '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 = '' },
|
-- { 'aI', function() require('various-textobjs').indentation(false, false) end, mode = { 'o', 'x' }, desc = '' },
|
||||||
{ 'iS', function() require('various-textobjs').subword(true) end, mode = { 'o', 'x' }, desc = '' },
|
{ 'iS', function() require('various-textobjs').subword('inner') end, mode = { 'o', 'x' }, desc = '' },
|
||||||
{ 'aS', function() require('various-textobjs').subword(false) end, mode = { 'o', 'x' }, desc = '' },
|
{ 'aS', function() require('various-textobjs').subword('outer') end, mode = { 'o', 'x' }, desc = '' },
|
||||||
{ '|', function() require('various-textobjs').column() 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 = '' },
|
{ 'L', function() require('various-textobjs').url() end, mode = { 'o', 'x' }, desc = '' },
|
||||||
-- {"YOUR_MAPPING",function() require("various-textobjs").toNextClosingBracket() 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')
|
local lines = require('lsp_lines')
|
||||||
lines.setup()
|
lines.setup()
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_lines = function(ns, bufnr)
|
virtual_lines = function(_, bufnr)
|
||||||
local ft = vim.api.nvim_get_option_value('filetype', { buf = bufnr })
|
local ft = vim.api.nvim_get_option_value('filetype', { buf = bufnr })
|
||||||
if ft == 'lazy' then
|
if ft == 'lazy' then
|
||||||
return false
|
return false
|
||||||
|
@ -249,30 +249,33 @@ return {
|
||||||
{ 'williamboman/mason.nvim', cmd = 'Mason', config = true },
|
{ 'williamboman/mason.nvim', cmd = 'Mason', config = true },
|
||||||
|
|
||||||
{
|
{
|
||||||
'mfussenegger/nvim-jdtls',
|
'yorickpeterse/nvim-pqf',
|
||||||
ft = 'java',
|
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 = '[...]',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
'folke/trouble.nvim',
|
'mfussenegger/nvim-jdtls',
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
ft = 'java',
|
||||||
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 = '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -291,4 +294,5 @@ return {
|
||||||
-- Your DBUI configuration
|
-- Your DBUI configuration
|
||||||
vim.g.db_ui_use_nerd_fonts = 1
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
end,
|
end,
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,14 +2,13 @@ return {
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
local wk = require('which-key')
|
local wk = require('which-key')
|
||||||
wk.register({
|
wk.add({
|
||||||
['<Space>f'] = { name = '+file' },
|
{'<Space>f', group = 'file' },
|
||||||
['<Space>g'] = { name = '+git' },
|
{'<Space>g', group = 'git' },
|
||||||
['<Space>l'] = { name = '+LSP' },
|
{'<Space>l', group = 'LSP' },
|
||||||
['<Space>t'] = { name = '+Trouble' },
|
{'<Space>d', group = 'Debug neovim' },
|
||||||
['<Space>d'] = { name = '+Debug neovim' },
|
{'<Space>c', group = 'Code' },
|
||||||
['<Space>c'] = { name = '+Code' },
|
{'<Space>cc', group = 'calls' },
|
||||||
['<Space>cc'] = { name = '+calls' },
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,8 @@
|
||||||
memory_limit=-1
|
memory_limit=-1
|
||||||
max_execution_time=0
|
max_execution_time=0
|
||||||
max_input_time=-1
|
max_input_time=-1
|
||||||
|
post_max_size=1G
|
||||||
|
upload_max_filesize=1G
|
||||||
xdebug.mode=debug
|
xdebug.mode=debug
|
||||||
xdebug.output_dir=/tmp
|
xdebug.output_dir=/tmp
|
||||||
xdebug.start_with_request=trigger
|
xdebug.start_with_request=trigger
|
||||||
|
|
|
@ -566,40 +566,11 @@ Regex=\.(mod|s3m|xm|it|mtm|669|stm|ult|far)$
|
||||||
RegexIgnoreCase=true
|
RegexIgnoreCase=true
|
||||||
Open=/usr/lib/mc/ext.d/sound.sh open mod
|
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]
|
[midi]
|
||||||
Regex=\.(midi?|rmid?)$
|
Regex=\.(midi?|rmid?)$
|
||||||
RegexIgnoreCase=true
|
RegexIgnoreCase=true
|
||||||
Open=/usr/lib/mc/ext.d/sound.sh open midi
|
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
|
# Play list
|
||||||
[playlist]
|
[playlist]
|
||||||
Regex=\.(m3u|pls)$
|
Regex=\.(m3u|pls)$
|
||||||
|
|
Loading…
Add table
Reference in a new issue