Compare commits
12 Commits
b4018bc19a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ba5fd1c33b | |||
| ff14f16bbd | |||
| 00b5d44396 | |||
| 9a6765df45 | |||
| 280c00b272 | |||
| 31a03cac7b | |||
| f59a288d59 | |||
| 5def28d407 | |||
| 2dec8af915 | |||
| 27c50224f7 | |||
| 39967dc120 | |||
| bea244a4aa |
1
after/ftplugin/dap-view-term.lua
Normal file
1
after/ftplugin/dap-view-term.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
vim.o.signcolumn = 'no'
|
||||||
4
init.lua
4
init.lua
@@ -1,3 +1,5 @@
|
|||||||
|
vim.loader.enable()
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
@@ -11,7 +13,7 @@ end
|
|||||||
pcall(function() require('local') end)
|
pcall(function() require('local') end)
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
vim.fn.system({ 'git', 'clone', '--filter=blob:none',
|
vim.fn.system({ 'git', 'clone', '--filter=blob:none',
|
||||||
'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
|
'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ local kanagawa = {
|
|||||||
-- Don't lighlight TODO specially in comments
|
-- Don't lighlight TODO specially in comments
|
||||||
for _, todo_group in pairs({
|
for _, todo_group in pairs({
|
||||||
'confTodo',
|
'confTodo',
|
||||||
|
'mojoTodo',
|
||||||
'ps1CommentTodo',
|
'ps1CommentTodo',
|
||||||
'pythonTodo',
|
'pythonTodo',
|
||||||
'zshTodo',
|
'zshTodo',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ return {
|
|||||||
'kbenzie/mason.nvim',
|
'kbenzie/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
|
'Jorenar/nvim-dap-disasm',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
@@ -29,16 +30,12 @@ return {
|
|||||||
|
|
||||||
-- UI plugins
|
-- UI plugins
|
||||||
require('dap-view').setup({
|
require('dap-view').setup({
|
||||||
winbar = {
|
auto_toggle = true,
|
||||||
sections = {
|
|
||||||
"console", "watches", "scopes", "exceptions",
|
|
||||||
"breakpoints", "threads", "repl",
|
|
||||||
},
|
|
||||||
-- Must be one of the sections declared above
|
|
||||||
default_section = "console",
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
require('nvim-dap-virtual-text').setup({})
|
require('nvim-dap-virtual-text').setup({})
|
||||||
|
require('dap-disasm').setup({
|
||||||
|
dapview_register = true,
|
||||||
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
pattern = {
|
pattern = {
|
||||||
|
|||||||
@@ -98,5 +98,10 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Keymaps
|
||||||
|
vim.keymap.set('n', '<leader>fm', function()
|
||||||
|
vim.o.foldmethod = 'expr'
|
||||||
|
end, {})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,18 @@ local noice = {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
-- noice,
|
-- noice,
|
||||||
{ 'echasnovski/mini.comment', opts = { options = { ignore_blank_line = true } } },
|
{
|
||||||
{ 'tpope/vim-unimpaired', lazy = false },
|
'echasnovski/mini.comment',
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
ignore_blank_line = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'tpope/vim-unimpaired',
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
{ 'stevearc/dressing.nvim' },
|
{ 'stevearc/dressing.nvim' },
|
||||||
{ 'kevinhwang91/nvim-bqf' },
|
{ 'kevinhwang91/nvim-bqf' },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ vim.api.nvim_create_user_command('Remove', function(opts)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Actually remove the file using the selected callback.
|
-- Actually remove the file using the selected callback.
|
||||||
vim.loop.fs_unlink(path, callback)
|
vim.uv.fs_unlink(path, callback)
|
||||||
end, { bang = true })
|
end, { bang = true })
|
||||||
|
|
||||||
-- :Move the file associated with the current buffer
|
-- :Move the file associated with the current buffer
|
||||||
@@ -62,7 +62,7 @@ vim.api.nvim_create_user_command('Move', function(opts)
|
|||||||
if vim.fn.isdirectory(dest) ~= 0 then
|
if vim.fn.isdirectory(dest) ~= 0 then
|
||||||
dest = vim.fn.resolve(dest .. '/' .. vim.fn.expand('%:t'))
|
dest = vim.fn.resolve(dest .. '/' .. vim.fn.expand('%:t'))
|
||||||
end
|
end
|
||||||
vim.loop.fs_rename(source, dest, function(err, success)
|
vim.uv.fs_rename(source, dest, function(err, success)
|
||||||
if success then
|
if success then
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.cmd.edit(dest)
|
vim.cmd.edit(dest)
|
||||||
@@ -87,7 +87,7 @@ vim.api.nvim_create_user_command('Rename', function(opts)
|
|||||||
dest = vim.fn.resolve(dir .. '/' .. opts.args)
|
dest = vim.fn.resolve(dir .. '/' .. opts.args)
|
||||||
end
|
end
|
||||||
local buffer = vim.api.nvim_get_current_buf()
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
vim.loop.fs_rename(source, dest, function(err, success)
|
vim.uv.fs_rename(source, dest, function(err, success)
|
||||||
if not success then
|
if not success then
|
||||||
error(err)
|
error(err)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ vim.keymap.set('', '<leader>p', '"+p', opts)
|
|||||||
vim.keymap.set('', '<leader>P', '"+P', opts)
|
vim.keymap.set('', '<leader>P', '"+P', opts)
|
||||||
|
|
||||||
-- Undo neovim's default mapping of Y to y$
|
-- Undo neovim's default mapping of Y to y$
|
||||||
vim.cmd.unmap('Y')
|
vim.keymap.del('n', 'Y')
|
||||||
|
|
||||||
-- Make nvim :terminal more like vim :terminal
|
-- Make nvim :terminal more like vim :terminal
|
||||||
vim.keymap.set('t', '<C-w>N', '<C-\\><C-n>', opts)
|
vim.keymap.set('t', '<C-w>N', '<C-\\><C-n>', opts)
|
||||||
@@ -50,3 +50,10 @@ vim.keymap.set('v', '<leader>rg', ":'<,'>Rg<CR>", opts)
|
|||||||
|
|
||||||
-- Mapping to toggle checkboxes
|
-- Mapping to toggle checkboxes
|
||||||
vim.keymap.set('n', '<leader><CR>', ':CheckboxToggle<CR>', opts)
|
vim.keymap.set('n', '<leader><CR>', ':CheckboxToggle<CR>', opts)
|
||||||
|
|
||||||
|
-- Format whole file using internal algorithm
|
||||||
|
vim.keymap.set('n', '<leader>gw', function()
|
||||||
|
local view = vim.fn.winsaveview()
|
||||||
|
vim.cmd('normal! gggwG')
|
||||||
|
vim.fn.winrestview(view)
|
||||||
|
end, { desc = 'Format whole file with gw' })
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ vim.opt.foldlevel = 20
|
|||||||
vim.opt.foldmethod = 'expr'
|
vim.opt.foldmethod = 'expr'
|
||||||
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
vim.opt.foldtext = ''
|
vim.opt.foldtext = ''
|
||||||
vim.opt.fillchars = 'fold: '
|
vim.opt.fillchars = { fold = ' ' }
|
||||||
|
|
||||||
-- Enable all mouse features
|
-- Enable all mouse features
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
|||||||
Reference in New Issue
Block a user