format lua files
This commit is contained in:
parent
584ad307d6
commit
2b21ea5e4e
@ -3,29 +3,29 @@ vim.cmd('language en_US.utf-8')
|
||||
|
||||
local opt = vim.opt
|
||||
local indent = 2
|
||||
opt.termguicolors = true -- Enable colors in terminal
|
||||
opt.hlsearch = true --Set highlight on search
|
||||
opt.number = true --Make line numbers default
|
||||
opt.termguicolors = true -- Enable colors in terminal
|
||||
opt.hlsearch = true --Set highlight on search
|
||||
opt.number = true --Make line numbers default
|
||||
opt.listchars:append('eol:↴')
|
||||
-- opt.listchars:append("space: ")
|
||||
-- opt.listchars:append 'space:⋅'
|
||||
opt.listchars:append('trail: ')
|
||||
opt.listchars:append('tab:→ ')
|
||||
opt.relativenumber = false --Make relative number default
|
||||
opt.mouse = 'a' --Enable mouse mode
|
||||
opt.breakindent = true --Enable break indent
|
||||
opt.undofile = true --Save undo history
|
||||
opt.ignorecase = true --Case insensitive searching unless /C or capital in search
|
||||
opt.smartcase = true -- Smart case
|
||||
opt.updatetime = 300 --Decrease update time
|
||||
opt.signcolumn = 'yes' -- Always show sign column
|
||||
opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete.
|
||||
opt.mouse = 'a' --Enable mouse mode
|
||||
opt.breakindent = true --Enable break indent
|
||||
opt.undofile = true --Save undo history
|
||||
opt.ignorecase = true --Case insensitive searching unless /C or capital in search
|
||||
opt.smartcase = true -- Smart case
|
||||
opt.updatetime = 300 --Decrease update time
|
||||
opt.signcolumn = 'yes' -- Always show sign column
|
||||
opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete.
|
||||
opt.ttimeoutlen = 10
|
||||
opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
|
||||
opt.scrolloff = 999 -- Lines of context
|
||||
opt.joinspaces = false -- No double spaces with join after a dot
|
||||
opt.showmatch = true -- Show matching braces
|
||||
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
|
||||
opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
|
||||
opt.scrolloff = 999 -- Lines of context
|
||||
opt.joinspaces = false -- No double spaces with join after a dot
|
||||
opt.showmatch = true -- Show matching braces
|
||||
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
|
||||
opt.list = true
|
||||
opt.hidden = true
|
||||
opt.winborder = 'none'
|
||||
@ -118,16 +118,16 @@ vim.diagnostic.config({
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon
|
||||
[vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon
|
||||
[vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon
|
||||
[vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example)
|
||||
[vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon
|
||||
[vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon
|
||||
[vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example)
|
||||
},
|
||||
-- Define the highlight group to use for the sign text for each severity
|
||||
texthl = {
|
||||
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
|
||||
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
||||
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
||||
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
||||
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
||||
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
||||
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
||||
},
|
||||
-- Optional: Highlight the line number column
|
||||
numhl = {
|
||||
@ -143,9 +143,9 @@ vim.diagnostic.config({
|
||||
-- Other diagnostic configurations (optional examples)
|
||||
virtual_text = false,
|
||||
virtual_lines = false,
|
||||
underline = true, -- Enable underlining diagnostics
|
||||
underline = true, -- Enable underlining diagnostics
|
||||
update_in_insert = false, -- Don't update diagnostics in insert mode
|
||||
severity_sort = true, -- Sort diagnostics by severity
|
||||
severity_sort = true, -- Sort diagnostics by severity
|
||||
})
|
||||
|
||||
-- Window border for floating windows
|
||||
|
@ -61,9 +61,9 @@ vim.keymap.set({ 'n', 'x' }, '<leader>P', '"+P', { desc = 'Paste from system cli
|
||||
vim.keymap.set('v', 'v', function()
|
||||
local mode = vim.fn.mode()
|
||||
if mode == 'v' then
|
||||
vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode
|
||||
vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode
|
||||
elseif mode == 'V' then
|
||||
vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode
|
||||
vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode
|
||||
end
|
||||
end, { noremap = true, silent = true })
|
||||
|
||||
|
@ -28,5 +28,5 @@ return {
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
enabled = false
|
||||
enabled = false,
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ return {
|
||||
-- 'echasnovski/mini.pick', -- for file_selector provider mini.pick
|
||||
-- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
|
||||
-- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
|
||||
'ibhagwan/fzf-lua', -- for file_selector provider fzf
|
||||
'ibhagwan/fzf-lua', -- for file_selector provider fzf
|
||||
'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
|
||||
-- 'zbirenbaum/copilot.lua', -- for providers='copilot'
|
||||
{
|
||||
|
@ -9,9 +9,9 @@ return {
|
||||
'fang2hou/blink-copilot',
|
||||
opts = {
|
||||
max_completions = 1, -- Global default for max completions
|
||||
max_attempts = 2, -- Global default for max attempts
|
||||
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',
|
||||
@ -90,15 +90,15 @@ return {
|
||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||
score_offset = 100,
|
||||
},
|
||||
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
|
||||
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',
|
||||
@ -115,12 +115,16 @@ return {
|
||||
-- default to all visible buffers
|
||||
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)
|
||||
:totable()
|
||||
.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)
|
||||
: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,19 +129,19 @@ return {
|
||||
{ name = 'cmdline_history' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'cmdline', priority = 200 },
|
||||
{ name = 'path', priority = 3 },
|
||||
{ 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',
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
return {
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
config = function()
|
||||
require('copilot').setup({
|
||||
filetypes = {
|
||||
yaml = false,
|
||||
markdown = false,
|
||||
python = true,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
cpp = true,
|
||||
['.'] = false,
|
||||
},
|
||||
suggestion = { enabled = false, auto_trigger = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
return {
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
config = function()
|
||||
require('copilot').setup({
|
||||
filetypes = {
|
||||
yaml = false,
|
||||
markdown = false,
|
||||
python = true,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
cpp = true,
|
||||
['.'] = false,
|
||||
},
|
||||
suggestion = { enabled = false, auto_trigger = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
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,56 +13,53 @@ return {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
|
||||
-- Navigation
|
||||
vim.keymap.set('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
end,
|
||||
{ desc = 'Next hunk' }
|
||||
)
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
end, { desc = 'Next hunk' })
|
||||
|
||||
vim.keymap.set('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ '[c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
end,
|
||||
{ desc = 'Previous hunk' }
|
||||
)
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ '[c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
end, { desc = 'Previous hunk' })
|
||||
|
||||
-- Actions
|
||||
vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'Stage hunk' })
|
||||
vim.keymap.set('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'Reset hunk' })
|
||||
|
||||
vim.keymap.set('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
end,
|
||||
{ desc = 'Stage hunk' }
|
||||
)
|
||||
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
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' }
|
||||
)
|
||||
gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
|
||||
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' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,63 +1,63 @@
|
||||
return {
|
||||
'Vigemus/iron.nvim',
|
||||
branch = 'master',
|
||||
config = function()
|
||||
local iron = require('iron.core')
|
||||
|
||||
iron.setup({
|
||||
config = {
|
||||
-- Whether a repl should be discarded or not
|
||||
scratch_repl = true,
|
||||
-- Your repl definitions come here
|
||||
repl_definition = {
|
||||
sh = {
|
||||
-- Can be a table or a function that
|
||||
-- returns a table (see below)
|
||||
command = { 'zsh' },
|
||||
},
|
||||
python = {
|
||||
command = { 'python3' }, -- or { "ipython", "--no-autoindent" }
|
||||
format = require('iron.fts.common').bracketed_paste_python,
|
||||
},
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
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
|
||||
keymaps = {
|
||||
send_motion = '<space>sc',
|
||||
visual_send = '<space>sc',
|
||||
send_file = '<space>sf',
|
||||
send_line = '<space>sl',
|
||||
send_paragraph = '<space>sp',
|
||||
send_until_cursor = '<space>su',
|
||||
send_mark = '<space>sm',
|
||||
mark_motion = '<space>mc',
|
||||
mark_visual = '<space>mc',
|
||||
remove_mark = '<space>md',
|
||||
cr = '<space>s<cr>',
|
||||
interrupt = '<space>s<space>',
|
||||
exit = '<space>sq',
|
||||
clear = '<space>cl',
|
||||
},
|
||||
-- If the highlight is on, you can change how it looks
|
||||
-- For the available options, check nvim_set_hl
|
||||
highlight = {
|
||||
italic = true,
|
||||
},
|
||||
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
|
||||
})
|
||||
|
||||
-- iron also has a list of commands, see :h iron-commands for all available commands
|
||||
end,
|
||||
cmd = {
|
||||
'IronRepl',
|
||||
'IronRestart',
|
||||
'IronFocus',
|
||||
'IronHide',
|
||||
'IronRepl',
|
||||
'IronReplHere',
|
||||
},
|
||||
}
|
||||
return {
|
||||
'Vigemus/iron.nvim',
|
||||
branch = 'master',
|
||||
config = function()
|
||||
local iron = require('iron.core')
|
||||
|
||||
iron.setup({
|
||||
config = {
|
||||
-- Whether a repl should be discarded or not
|
||||
scratch_repl = true,
|
||||
-- Your repl definitions come here
|
||||
repl_definition = {
|
||||
sh = {
|
||||
-- Can be a table or a function that
|
||||
-- returns a table (see below)
|
||||
command = { 'zsh' },
|
||||
},
|
||||
python = {
|
||||
command = { 'python3' }, -- or { "ipython", "--no-autoindent" }
|
||||
format = require('iron.fts.common').bracketed_paste_python,
|
||||
},
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
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
|
||||
keymaps = {
|
||||
send_motion = '<space>sc',
|
||||
visual_send = '<space>sc',
|
||||
send_file = '<space>sf',
|
||||
send_line = '<space>sl',
|
||||
send_paragraph = '<space>sp',
|
||||
send_until_cursor = '<space>su',
|
||||
send_mark = '<space>sm',
|
||||
mark_motion = '<space>mc',
|
||||
mark_visual = '<space>mc',
|
||||
remove_mark = '<space>md',
|
||||
cr = '<space>s<cr>',
|
||||
interrupt = '<space>s<space>',
|
||||
exit = '<space>sq',
|
||||
clear = '<space>cl',
|
||||
},
|
||||
-- If the highlight is on, you can change how it looks
|
||||
-- For the available options, check nvim_set_hl
|
||||
highlight = {
|
||||
italic = true,
|
||||
},
|
||||
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
|
||||
})
|
||||
|
||||
-- iron also has a list of commands, see :h iron-commands for all available commands
|
||||
end,
|
||||
cmd = {
|
||||
'IronRepl',
|
||||
'IronRestart',
|
||||
'IronFocus',
|
||||
'IronHide',
|
||||
'IronRepl',
|
||||
'IronReplHere',
|
||||
},
|
||||
}
|
||||
|
@ -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.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' }))
|
||||
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' }))
|
||||
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.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' }))
|
||||
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' }))
|
||||
|
||||
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,
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ return {
|
||||
config = function()
|
||||
local colors = require('bamboo.palette')
|
||||
require('bamboo').setup({
|
||||
dim_inactive = false, -- Dim inactive windows/buffers
|
||||
dim_inactive = false, -- Dim inactive windows/buffers
|
||||
lualine = {
|
||||
transparent = false, -- lualine center bar transparency
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user