format lua files
This commit is contained in:
parent
584ad307d6
commit
2b21ea5e4e
@ -28,5 +28,5 @@ return {
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
enabled = false
|
||||
enabled = false,
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ return {
|
||||
max_completions = 1, -- Global default for max completions
|
||||
max_attempts = 2, -- Global default for max attempts
|
||||
-- `kind` is not set, so the default value is "Copilot"
|
||||
}
|
||||
},
|
||||
},
|
||||
'dmitmel/cmp-cmdline-history',
|
||||
'onsails/lspkind.nvim',
|
||||
@ -26,7 +26,7 @@ return {
|
||||
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
|
||||
opts = {},
|
||||
},
|
||||
'rcarriga/cmp-dap'
|
||||
'rcarriga/cmp-dap',
|
||||
},
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
@ -69,7 +69,7 @@ return {
|
||||
'snippets',
|
||||
'path',
|
||||
'buffer',
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
providers = {
|
||||
@ -82,7 +82,7 @@ return {
|
||||
-- Local options override global ones
|
||||
-- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot"
|
||||
max_completions = 3, -- Override global max_completions
|
||||
}
|
||||
},
|
||||
},
|
||||
lazydev = {
|
||||
name = 'LazyDev',
|
||||
@ -93,12 +93,12 @@ return {
|
||||
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
|
||||
name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp
|
||||
module = 'blink.compat.source',
|
||||
async = true
|
||||
async = true,
|
||||
},
|
||||
cmdline_history = {
|
||||
name = 'cmdline_history',
|
||||
module = 'blink.compat.source',
|
||||
score_offset = -50
|
||||
score_offset = -50,
|
||||
},
|
||||
dap = {
|
||||
name = 'dap',
|
||||
@ -116,11 +116,15 @@ return {
|
||||
get_bufnrs = function()
|
||||
return vim
|
||||
.iter(vim.api.nvim_list_wins())
|
||||
:map(function(win) return vim.api.nvim_win_get_buf(win) end)
|
||||
:filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end)
|
||||
:map(function(win)
|
||||
return vim.api.nvim_win_get_buf(win)
|
||||
end)
|
||||
:filter(function(buf)
|
||||
return vim.bo[buf].buftype ~= 'nofile'
|
||||
end)
|
||||
:totable()
|
||||
end,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -129,9 +133,13 @@ return {
|
||||
sources = function()
|
||||
local type = vim.fn.getcmdtype()
|
||||
-- Search forward and backward
|
||||
if type == '/' or type == '?' then return { 'buffer' } end
|
||||
if type == '/' or type == '?' then
|
||||
return { 'buffer' }
|
||||
end
|
||||
-- Commands
|
||||
if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end
|
||||
if type == ':' or type == '@' then
|
||||
return { 'cmdline', 'buffer', 'cmdline_history' }
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
completion = {
|
||||
@ -142,30 +150,29 @@ return {
|
||||
list = {
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
preselect = false
|
||||
}
|
||||
preselect = false,
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set
|
||||
}
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
['<down>'] = { 'select_next', 'fallback' },
|
||||
['<up>'] = { 'select_prev', 'fallback' },
|
||||
['<CR>'] = { 'accept', 'fallback' },
|
||||
['<C-e>'] = { 'cancel' },
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
completion = {
|
||||
list = {
|
||||
selection = {
|
||||
auto_insert = false,
|
||||
preselect = false
|
||||
}
|
||||
preselect = false,
|
||||
},
|
||||
accept =
|
||||
{
|
||||
},
|
||||
accept = {
|
||||
dot_repeat = false,
|
||||
},
|
||||
menu = {
|
||||
@ -213,25 +220,25 @@ return {
|
||||
end
|
||||
return hl
|
||||
end,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
treesitter_highlighting = true
|
||||
treesitter_highlighting = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- experimental signature help support
|
||||
signature = { enabled = true },
|
||||
snippets = {
|
||||
preset = 'luasnip'
|
||||
preset = 'luasnip',
|
||||
},
|
||||
},
|
||||
-- allows extending the providers array elsewhere in your config
|
||||
-- without having to redefine it
|
||||
opts_extend = { 'sources.default' },
|
||||
enabled = false
|
||||
enabled = false,
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ return {
|
||||
|
||||
window = {
|
||||
documentation = {
|
||||
winhighlight = 'Normal:CmpDocumentation'
|
||||
winhighlight = 'Normal:CmpDocumentation',
|
||||
},
|
||||
completion = {
|
||||
winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None',
|
||||
@ -111,8 +111,7 @@ return {
|
||||
fields = { 'kind', 'abbr', 'menu' },
|
||||
expandable_indicator = false,
|
||||
format = function(entry, vim_item)
|
||||
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })(
|
||||
entry, vim_item)
|
||||
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, '%s', { trimempty = true })
|
||||
kind.kind = ' ' .. (strings[1] or '') .. ' '
|
||||
kind.menu = ' (' .. (strings[2] or '') .. ')'
|
||||
@ -130,7 +129,7 @@ return {
|
||||
{ name = 'cmdline_history' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
@ -140,9 +139,9 @@ return {
|
||||
{ name = 'cmdline', priority = 200 },
|
||||
{ name = 'path', priority = 3 },
|
||||
{ name = 'cmdline_history', priority = 3 },
|
||||
{ name = 'buffer', priority = 3 }
|
||||
{ name = 'buffer', priority = 3 },
|
||||
},
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
matching = { disallow_symbol_nonprefix_matching = false },
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
@ -6,5 +6,5 @@ return {
|
||||
config = function()
|
||||
require('codeium').setup({})
|
||||
end,
|
||||
enabled = vim.fn.hostname() == 'perryLinux64'
|
||||
enabled = vim.fn.hostname() == 'perryLinux64',
|
||||
}
|
||||
|
@ -22,4 +22,3 @@ return {
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
branch = 'main',
|
||||
config = function()
|
||||
require('gitsigns').setup {
|
||||
require('gitsigns').setup({
|
||||
current_line_blame = false,
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
@ -13,7 +13,6 @@ return {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
|
||||
-- Navigation
|
||||
vim.keymap.set('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
@ -21,9 +20,7 @@ return {
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
end,
|
||||
{ desc = 'Next hunk' }
|
||||
)
|
||||
end, { desc = 'Next hunk' })
|
||||
|
||||
vim.keymap.set('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
@ -31,9 +28,7 @@ return {
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
end,
|
||||
{ desc = 'Previous hunk' }
|
||||
)
|
||||
end, { desc = 'Previous hunk' })
|
||||
|
||||
-- Actions
|
||||
vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'Stage hunk' })
|
||||
@ -41,28 +36,30 @@ return {
|
||||
|
||||
vim.keymap.set('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
end,
|
||||
{ desc = 'Stage hunk' }
|
||||
)
|
||||
end, { desc = 'Stage hunk' })
|
||||
|
||||
vim.keymap.set('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
end,
|
||||
{ desc = 'Reset hunk' }
|
||||
)
|
||||
end, { desc = 'Reset hunk' })
|
||||
|
||||
vim.keymap.set('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'Stage buffer' })
|
||||
vim.keymap.set('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'Reset buffer' })
|
||||
vim.keymap.set('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'Preview hunk' })
|
||||
vim.keymap.set('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' })
|
||||
|
||||
vim.keymap.set('n', '<leader>hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' })
|
||||
vim.keymap.set('n', '<leader>hb', function()
|
||||
gitsigns.blame_line({ full = true })
|
||||
end, { desc = 'Blame line' })
|
||||
|
||||
vim.keymap.set('n', '<leader>hd', gitsigns.diffthis, { desc = 'Diff this' })
|
||||
|
||||
vim.keymap.set('n', '<leader>hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' })
|
||||
vim.keymap.set('n', '<leader>hD', function()
|
||||
gitsigns.diffthis('~')
|
||||
end, { desc = 'Diff this (cached)' })
|
||||
|
||||
vim.keymap.set('n', '<leader>hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' })
|
||||
vim.keymap.set('n', '<leader>hQ', function()
|
||||
gitsigns.setqflist('all')
|
||||
end, { desc = 'Set quickfix list all' })
|
||||
vim.keymap.set('n', '<leader>hq', gitsigns.setqflist, { desc = 'Set quickfix list' })
|
||||
|
||||
-- Toggles
|
||||
@ -72,7 +69,7 @@ return {
|
||||
|
||||
-- Text object
|
||||
vim.keymap.set({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
end
|
||||
}
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
@ -1,19 +1,16 @@
|
||||
return {
|
||||
'MagicDuck/grug-far.nvim',
|
||||
config = function()
|
||||
require('grug-far').setup({
|
||||
});
|
||||
require('grug-far').setup({})
|
||||
end,
|
||||
keys =
|
||||
{
|
||||
keys = {
|
||||
{
|
||||
'<C-f>',
|
||||
function()
|
||||
require('grug-far').open()
|
||||
end,
|
||||
desc = 'GrugFar',
|
||||
mode = { 'n', 'v' }
|
||||
}
|
||||
}
|
||||
|
||||
mode = { 'n', 'v' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ return {
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
repl_open_cmd = require('iron.view').split.vertical("50%")
|
||||
repl_open_cmd = require('iron.view').split.vertical('50%'),
|
||||
},
|
||||
-- Iron doesn't set keymaps by default anymore.
|
||||
-- You can set them here or manually add keymaps to the functions in iron.core
|
||||
|
@ -14,5 +14,5 @@ return {
|
||||
{
|
||||
'Bilal2453/luvit-meta',
|
||||
lazy = true,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
local M = {}
|
||||
|
||||
|
||||
M.setup_server = function(lspconfig, capabilities, on_attach)
|
||||
-- lspconfig['pyright'].setup {
|
||||
-- capabilities = capabilities,
|
||||
@ -137,7 +136,6 @@ M.setup_server = function(lspconfig, capabilities, on_attach)
|
||||
}
|
||||
lspconfig.neocmake.setup({})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -2,30 +2,20 @@ local lspKeys = function(client, bufnr)
|
||||
local options = { noremap = true, silent = false, buffer = bufnr }
|
||||
vim.keymap.set('n', '<space>,', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' }))
|
||||
vim.keymap.set('n', '<space>;', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' }))
|
||||
vim.keymap.set({ 'n', 'x' }, '<space>a', vim.lsp.buf.code_action,
|
||||
vim.tbl_extend('error', options, { desc = 'Code action' }))
|
||||
vim.keymap.set({ 'n', 'x' }, '<space>a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' }))
|
||||
vim.keymap.set('n', '<space>e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' }))
|
||||
vim.keymap.set('n', '<space>h',
|
||||
function()
|
||||
vim.keymap.set('n', '<space>h', function()
|
||||
vim.lsp.buf.hover({ border = 'rounded' })
|
||||
end,
|
||||
vim.tbl_extend('error', options, { desc = 'Hover' }))
|
||||
vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls,
|
||||
vim.tbl_extend('error', options, { desc = 'Outgoing calls' }))
|
||||
vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls,
|
||||
vim.tbl_extend('error', options, { desc = 'Incoming calls' }))
|
||||
end, vim.tbl_extend('error', options, { desc = 'Hover' }))
|
||||
vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' }))
|
||||
vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' }))
|
||||
vim.keymap.set('n', '<space>m', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' }))
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition,
|
||||
vim.tbl_extend('error', options, { desc = 'Type definition' }))
|
||||
vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help,
|
||||
vim.tbl_extend('error', options, { desc = 'Signature help' }))
|
||||
vim.keymap.set('n', '<space>v',
|
||||
function()
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' }))
|
||||
vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' }))
|
||||
vim.keymap.set('n', '<space>v', function()
|
||||
vim.diagnostic.open_float({ border = 'rounded' })
|
||||
end,
|
||||
vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
|
||||
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>',
|
||||
vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))
|
||||
end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
|
||||
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))
|
||||
|
||||
if client.supports_method('inlayHintProvider') then
|
||||
vim.keymap.set('n', '<space>i', function()
|
||||
@ -59,7 +49,7 @@ return {
|
||||
'Fildo7525/pretty_hover',
|
||||
{
|
||||
'creativenull/efmls-configs-nvim',
|
||||
branch = 'main'
|
||||
branch = 'main',
|
||||
},
|
||||
'SmiteshP/nvim-navic',
|
||||
},
|
||||
|
@ -45,7 +45,7 @@ return {
|
||||
cond = function()
|
||||
return package.loaded['nvim-navic'] and require('nvim-navic').is_available()
|
||||
end,
|
||||
color = { fg = colors.vulgaris.blue }
|
||||
color = { fg = colors.vulgaris.blue },
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
@ -122,7 +122,7 @@ return {
|
||||
tabs_color = {
|
||||
-- Same values as the general color option can be used here.
|
||||
active = { bg = 'orange', fg = 'black' },
|
||||
inactive = { bg = 'grey'},
|
||||
inactive = { bg = 'grey' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -36,7 +36,7 @@ return {
|
||||
'stylua',
|
||||
'gersemi',
|
||||
'cmakelang',
|
||||
'ruff'
|
||||
'ruff',
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
@ -5,5 +5,5 @@ return {
|
||||
---@type render.md.UserConfig
|
||||
opts = {
|
||||
completions = { blink = { enabled = true } },
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -41,5 +41,5 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
enabled = false
|
||||
enabled = false,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user