You've already forked dotfiles
fix: Large cleanup of formatting in plugins, re-enabling of gdb in DAP,
removing large portions of the render-markdown plugin settings as they are just the defaults
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
config = function ()
|
||||
config = function()
|
||||
require('nvim-autopairs').setup()
|
||||
end
|
||||
}
|
||||
|
||||
@@ -96,11 +96,11 @@ return {
|
||||
vim.fn.sign_define('DapBreakpointCondition', { text = '🝌', texthl = '', lineh = '', numhl = '' })
|
||||
vim.fn.sign_define('DapStopped', { text = '▶️' })
|
||||
|
||||
-- dap.adapters.gdb = {
|
||||
-- type = 'executable',
|
||||
-- command = 'gdb',
|
||||
-- args = { '-i', 'dap' },
|
||||
-- }
|
||||
dap.adapters.gdb = {
|
||||
type = 'executable',
|
||||
command = 'gdb',
|
||||
args = { '-i', 'dap' },
|
||||
}
|
||||
|
||||
dap.adapters.lldb = {
|
||||
command = 'lldb',
|
||||
@@ -130,7 +130,7 @@ return {
|
||||
name = 'Launch current file',
|
||||
request = 'launch',
|
||||
program = '${file}',
|
||||
pythonPath = function ()
|
||||
pythonPath = function()
|
||||
if vim.env.VIRTUAL_ENV then
|
||||
return vim.env.VIRTUAL_ENV .. '/bin/python'
|
||||
end
|
||||
@@ -157,7 +157,7 @@ return {
|
||||
{
|
||||
'<leader>dh',
|
||||
function() require('dap.ui.widgets').hover() end,
|
||||
mode = 'n', 'v',
|
||||
mode = { 'n', 'v' },
|
||||
desc = 'DAP: Debug hover',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,46 +6,46 @@ return {
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({']c', bang = true})
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ ']c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('next')
|
||||
end
|
||||
end)
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({'[c', bang = true})
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ '[c', bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk('prev')
|
||||
end
|
||||
end)
|
||||
|
||||
-- Actions
|
||||
map('n', '<leader>gs', gitsigns.stage_hunk)
|
||||
map('n', '<leader>gu', gitsigns.undo_stage_hunk)
|
||||
map('n', '<leader>gr', gitsigns.reset_hunk)
|
||||
map('v', '<leader>gs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
|
||||
map('v', '<leader>gu', function() gitsigns.undo_stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
|
||||
map('v', '<leader>gr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end)
|
||||
map('v', '<leader>gs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
|
||||
map('v', '<leader>gu', function() gitsigns.undo_stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
|
||||
map('v', '<leader>gr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
|
||||
map('n', '<leader>gS', gitsigns.stage_buffer)
|
||||
map('n', '<leader>gR', gitsigns.reset_buffer)
|
||||
map('n', '<leader>gp', gitsigns.preview_hunk)
|
||||
map('n', '<leader>gb', function() gitsigns.blame_line{full=true} end)
|
||||
map('n', '<leader>gb', function() gitsigns.blame_line { full = true } end)
|
||||
map('n', '<leader>gtb', gitsigns.toggle_current_line_blame)
|
||||
map('n', '<leader>gd', gitsigns.diffthis)
|
||||
map('n', '<leader>gD', function() gitsigns.diffthis('~') end)
|
||||
map('n', '<leader>gtd', gitsigns.toggle_deleted)
|
||||
|
||||
-- Text object
|
||||
map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
end
|
||||
}
|
||||
end,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function ()
|
||||
config = function()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
vim.diagnostic.config ({
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
source = 'always',
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ return {
|
||||
},
|
||||
})
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
require('luasnip.loaders.from_lua').lazy_load({paths = "./snippets"})
|
||||
require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" })
|
||||
end,
|
||||
dependencies = {
|
||||
'saadparwaiz1/cmp_luasnip', -- Wrapper to load snippets in nvim-cmp
|
||||
|
||||
@@ -7,20 +7,18 @@ return {
|
||||
automatic_enable = true,
|
||||
ensure_installed = {
|
||||
-- Currently having issues with including some of the LSPs, even though they match the names in Mason
|
||||
'ansiblels', -- Ansible
|
||||
'ansiblels', -- Ansible
|
||||
'arduino_language_server', -- Arduino specific C
|
||||
'bashls', -- Bash
|
||||
-- 'cfn-lint', -- Cloudformation for AWS
|
||||
'clangd', -- C/C++
|
||||
-- 'gdtoolkit', -- Godot script
|
||||
-- 'hadolint', -- Dockerfile linting
|
||||
'intelephense', -- PHP
|
||||
'lua_ls', -- Lua
|
||||
'marksman', -- markdown
|
||||
'pylsp', -- Python
|
||||
'rust_analyzer', -- Rust
|
||||
'ts_ls', -- Typscript
|
||||
'yamlls', -- YAML
|
||||
'bashls', -- Bash
|
||||
'cfn-lint', -- Cloudformation for AWS
|
||||
'clangd', -- C/C++
|
||||
'intelephense', -- PHP
|
||||
'lua_ls', -- Lua
|
||||
'marksman', -- markdown
|
||||
'pylsp', -- Python
|
||||
'rust_analyzer', -- Rust
|
||||
'ts_ls', -- Typscript
|
||||
'yamlls', -- YAML
|
||||
}
|
||||
}
|
||||
end,
|
||||
|
||||
@@ -1,116 +1,14 @@
|
||||
return {
|
||||
'meanderingprogrammer/render-markdown.nvim',
|
||||
config = function ()
|
||||
config = function()
|
||||
require('render-markdown').setup({
|
||||
enabled = true,
|
||||
render_modes = { 'n', 'c', 't' },
|
||||
max_file_size = 10.0,
|
||||
debounce = 100,
|
||||
file_types = {
|
||||
'markdown',
|
||||
'telekasten'
|
||||
},
|
||||
link = {
|
||||
enabled = true,
|
||||
footnote = {
|
||||
enabled = true,
|
||||
superscript = true,
|
||||
prefix = '',
|
||||
suffix = '',
|
||||
},
|
||||
highlight = 'RenderMarkdownLink',
|
||||
},
|
||||
latex = {
|
||||
enabled = false,
|
||||
},
|
||||
checkbox = {
|
||||
enabled = true,
|
||||
render_modes = false,
|
||||
bullet = false,
|
||||
right_pad = 1,
|
||||
unchecked = {
|
||||
-- icon = ' ',
|
||||
highlight = 'RenderMarkdownUnchecked',
|
||||
scope_highlight = nil,
|
||||
},
|
||||
checked = {
|
||||
-- icon = ' ',
|
||||
highlight = 'RenderMarkdownChecked',
|
||||
},
|
||||
custom = {
|
||||
todo = {
|
||||
raw = '[-]',
|
||||
-- rendered = '',
|
||||
highlight = 'RenderMarkdownTodo',
|
||||
scope_highlight = nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
bullet = {
|
||||
enabled = true,
|
||||
render_modes = false,
|
||||
icons = { '●', '○', '◆', '◇' },
|
||||
ordered_icons = function (ctx)
|
||||
local value = vim.trim(ctx.value)
|
||||
local index = tonumber(value:sub(1, #value - 1))
|
||||
return ('%d'):format(index > 1 and index or ctx.index)
|
||||
end,
|
||||
left_pad = 0,
|
||||
right_pad = 0,
|
||||
highlight = 'RenderMarkdownBullet',
|
||||
scope_highlight = {},
|
||||
},
|
||||
-- quote = { icon = '▋' },
|
||||
anti_conceal = {
|
||||
enabled = true,
|
||||
ignore = {
|
||||
code_background = true,
|
||||
sign = true,
|
||||
},
|
||||
above = 0,
|
||||
below = 0,
|
||||
},
|
||||
custom = {
|
||||
},
|
||||
callout = {
|
||||
-- Callouts are a special instance of a 'block_quote' that start with a 'shortcut_link'.
|
||||
-- The key is for healthcheck and to allow users to change its values, value type below.
|
||||
-- | raw | matched against the raw text of a 'shortcut_link', case insensitive |
|
||||
-- | rendered | replaces the 'raw' value when rendering |
|
||||
-- | highlight | highlight for the 'rendered' text and quote markers |
|
||||
-- | quote_icon | optional override for quote.icon value for individual callout |
|
||||
-- | category | optional metadata useful for filtering |
|
||||
|
||||
note = { raw = '[!NOTE]', rendered = ' Note', highlight = 'RenderMarkdownInfo'},
|
||||
tip = { raw = '[!TIP]', rendered = ' Tip', highlight = 'RenderMarkdownSuccess'},
|
||||
important = { raw = '[!IMPORTANT]', rendered = ' Important', highlight = 'RenderMarkdownHint'},
|
||||
warning = { raw = '[!WARNING]', rendered = ' Warning', highlight = 'RenderMarkdownWarn'},
|
||||
caution = { raw = '[!CAUTION]', rendered = ' Caution', highlight = 'RenderMarkdownError'},
|
||||
abstract = { raw = '[!ABSTRACT]', rendered = ' Abstract', highlight = 'RenderMarkdownInfo'},
|
||||
summary = { raw = '[!SUMMARY]', rendered = ' Summary', highlight = 'RenderMarkdownInfo'},
|
||||
tldr = { raw = '[!TLDR]', rendered = ' Tldr', highlight = 'RenderMarkdownInfo'},
|
||||
info = { raw = '[!INFO]', rendered = ' Info', highlight = 'RenderMarkdownInfo'},
|
||||
todo = { raw = '[!TODO]', rendered = ' Todo', highlight = 'RenderMarkdownInfo'},
|
||||
hint = { raw = '[!HINT]', rendered = ' Hint', highlight = 'RenderMarkdownSuccess'},
|
||||
success = { raw = '[!SUCCESS]', rendered = ' Success', highlight = 'RenderMarkdownSuccess'},
|
||||
check = { raw = '[!CHECK]', rendered = ' Check', highlight = 'RenderMarkdownSuccess'},
|
||||
done = { raw = '[!DONE]', rendered = ' Done', highlight = 'RenderMarkdownSuccess'},
|
||||
question = { raw = '[!QUESTION]', rendered = ' Question', highlight = 'RenderMarkdownWarn'},
|
||||
help = { raw = '[!HELP]', rendered = ' Help', highlight = 'RenderMarkdownWarn'},
|
||||
faq = { raw = '[!FAQ]', rendered = ' Faq', highlight = 'RenderMarkdownWarn'},
|
||||
attention = { raw = '[!ATTENTION]', rendered = ' Attention', highlight = 'RenderMarkdownWarn'},
|
||||
failure = { raw = '[!FAILURE]', rendered = ' Failure', highlight = 'RenderMarkdownError'},
|
||||
fail = { raw = '[!FAIL]', rendered = ' Fail', highlight = 'RenderMarkdownError'},
|
||||
missing = { raw = '[!MISSING]', rendered = ' Missing', highlight = 'RenderMarkdownError'},
|
||||
danger = { raw = '[!DANGER]', rendered = ' Danger', highlight = 'RenderMarkdownError'},
|
||||
error = { raw = '[!ERROR]', rendered = ' Error', highlight = 'RenderMarkdownError'},
|
||||
bug = { raw = '[!BUG]', rendered = ' Bug', highlight = 'RenderMarkdownError'},
|
||||
example = { raw = '[!EXAMPLE]', rendered = ' Example', highlight = 'RenderMarkdownHint' },
|
||||
quote = { raw = '[!QUOTE]', rendered = ' Quote', highlight = 'RenderMarkdownQuote'},
|
||||
cite = { raw = '[!CITE]', rendered = ' Cite', highlight = 'RenderMarkdownQuote'},
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function string.insert(str1, str2, pos)
|
||||
return str1:sub(1, pos)..str2..str1:sub(pos+1)
|
||||
return str1:sub(1, pos) .. str2 .. str1:sub(pos + 1)
|
||||
end
|
||||
|
||||
function toggleTODO(current_line)
|
||||
@@ -22,7 +22,7 @@ vim.api.nvim_create_user_command('ToggleTODO', function()
|
||||
|
||||
local new_line = toggleTODO(current_line)
|
||||
|
||||
vim.api.nvim_buf_set_lines(0, row-1, row, true, {new_line})
|
||||
vim.api.nvim_buf_set_lines(0, row - 1, row, true, { new_line })
|
||||
end, {})
|
||||
|
||||
return {
|
||||
|
||||
@@ -140,7 +140,7 @@ return {
|
||||
grouped = true,
|
||||
previewer = false,
|
||||
initial_mode = 'normal',
|
||||
layout_config = {height = 40},
|
||||
layout_config = { height = 40 },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
'folke/twilight.nvim',
|
||||
config = function ()
|
||||
config = function()
|
||||
require('twilight').setup({
|
||||
dimming = {
|
||||
alpha = 0.3,
|
||||
|
||||
Reference in New Issue
Block a user