You've already forked dotfiles
feat: Adding the TSI (Tree-Sitter Install) command, changing the ui2
setup to use floating messages instead of the cmdline output, cleanup of plugin loading.
This commit is contained in:
@@ -4,6 +4,13 @@ vim.api.nvim_create_user_command('FindAndReplace', function(opts)
|
|||||||
vim.api.nvim_command(string.format('cfdo s/%s/%s/gc', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
|
vim.api.nvim_command(string.format('cfdo s/%s/%s/gc', opts.fargs[1], opts.fargs[2]) .. '| update | cclose')
|
||||||
end, { nargs = '*' })
|
end, { nargs = '*' })
|
||||||
|
|
||||||
--vim.api.nvim_create_user_command('TSI', function (opts)
|
-- TODO: Set up a command for installing treesitter plugins via luarocks
|
||||||
--
|
vim.api.nvim_create_user_command('TSI', function(opts)
|
||||||
--end)
|
local result = vim.system({ 'luarocks', 'install', 'tree-sitter-' .. opts.fargs[1] }, { text = true }):wait()
|
||||||
|
if result.code == 0 then
|
||||||
|
print('Completed install of tree-sitter-' .. opts.fargs[1])
|
||||||
|
else
|
||||||
|
print('Failed to install tree-sitter-' .. opts.fargs[1])
|
||||||
|
print(result.stdout)
|
||||||
|
end
|
||||||
|
end, { nargs = '*' })
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
require('vim._core.ui2').enable() -- message + cmdline presentation layer replacement
|
require('vim._core.ui2').enable {
|
||||||
|
enable = true,
|
||||||
|
msg = {
|
||||||
|
targets = "msg",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- Load the following plugins eagerly to prevent visual oddities
|
-- Load the following plugins eagerly to prevent visual oddities
|
||||||
require('plugins.gruvbox') -- Colorscheme setup
|
require('plugins.gruvbox') -- Colorscheme setup
|
||||||
@@ -17,18 +22,16 @@ vim.schedule(function()
|
|||||||
require('plugins.render-markdown') -- Render markdown directly in neovim
|
require('plugins.render-markdown') -- Render markdown directly in neovim
|
||||||
require('plugins.luasnip') -- Snippet engine
|
require('plugins.luasnip') -- Snippet engine
|
||||||
|
|
||||||
vim.pack.add({ 'https://github.com/windwp/nvim-autopairs' }) -- Autocomplete symbol pairs when typing
|
vim.pack.add({
|
||||||
vim.pack.add({ 'https://github.com/tpope/vim-surround' }) -- Change surrounding characters (doesn't need setup called)
|
'https://github.com/windwp/nvim-autopairs', -- Autocomplete symbol pairs when typing
|
||||||
vim.pack.add({ 'https://github.com/tpope/vim-fugitive' }) -- _The_ Git integration plugin people have been using forever
|
'https://github.com/tpope/vim-surround', -- Change surrounding characters (doesn't need setup called)
|
||||||
vim.pack.add({ 'https://github.com/habamax/vim-godot' }) -- Godot specific bindings and debug
|
'https://github.com/tpope/vim-fugitive', -- _The_ Git integration plugin people have been using forever
|
||||||
|
'https://github.com/habamax/vim-godot' -- Godot specific bindings and debug
|
||||||
|
})
|
||||||
|
|
||||||
require('nvim-autopairs').setup() -- Automatic pair completion of paranteticals, braces, quotes, etc.
|
require('nvim-autopairs').setup() -- Automatic pair completion of paranteticals, braces, quotes, etc.
|
||||||
require('plugins.dap') -- DAP debugging plugin
|
require('plugins.dap') -- DAP debugging plugin
|
||||||
require('plugins.dap-python') -- Debug plugin settings specifically for python
|
require('plugins.dap-python') -- Debug plugin settings specifically for python
|
||||||
require('plugins.yaml-companion') -- Additional YAML and JSON schema helper
|
require('plugins.yaml-companion') -- Additional YAML and JSON schema helper
|
||||||
|
require('plugins.nvim-lint') -- Linter loader
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- TODO: Still in need of translation to the new setup
|
|
||||||
|
|
||||||
-- Currently not enabled
|
|
||||||
-- require('plugins.nvim-lint'), -- Linter loader
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
'tpope/vim-fugitive',
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,17 @@
|
|||||||
return {
|
vim.pack.add({
|
||||||
'mfussenegger/nvim-lint',
|
'https://github.com/mfussenegger/nvim-lint'
|
||||||
config = function()
|
})
|
||||||
|
|
||||||
require('lint').linters_by_ft = {
|
require('lint').linters_by_ft = {
|
||||||
yaml = { 'cfn_lint' }
|
yaml = { 'cfn_lint' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Run linting automatically after writing and reading a buffer
|
||||||
|
-- (A bit too often as it is with manual runs available via keymapping)
|
||||||
-- vim.api.nvim_create_autocmd({ 'BufWritePost', 'BufReadPost' }, {
|
-- vim.api.nvim_create_autocmd({ 'BufWritePost', 'BufReadPost' }, {
|
||||||
-- callback = function()
|
-- callback = function()
|
||||||
-- require('lint').try_lint()
|
-- require('lint').try_lint()
|
||||||
-- end,
|
-- end,
|
||||||
-- })
|
-- })
|
||||||
end,
|
|
||||||
keys = {
|
vim.keymap.set('n', ';l', function() require('lint').try_lint() end)
|
||||||
{
|
|
||||||
';l',
|
|
||||||
function()
|
|
||||||
require('lint').try_lint()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ vim.opt.listchars = 'tab:|·,trail:¬,extends:>,precedes:<,nbsp:+' -- Charact
|
|||||||
vim.opt.mouse = 'a' -- Enable mouse mode
|
vim.opt.mouse = 'a' -- Enable mouse mode
|
||||||
vim.opt.number = true -- Show the line number in the gutter.
|
vim.opt.number = true -- Show the line number in the gutter.
|
||||||
vim.opt.relativenumber = true -- Relative line number
|
vim.opt.relativenumber = true -- Relative line number
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
vim.opt.sidescrolloff = 8
|
||||||
vim.opt.shiftround = true -- Round indentation to shiftwidth
|
vim.opt.shiftround = true -- Round indentation to shiftwidth
|
||||||
vim.opt.shiftwidth = 4 -- Number of spaces a tab counts for when converting tabs to spaces
|
vim.opt.shiftwidth = 4 -- Number of spaces a tab counts for when converting tabs to spaces
|
||||||
vim.opt.shortmess = 'at' -- Abbreviations and truncation of cmd messages
|
vim.opt.shortmess = 'at' -- Abbreviations and truncation of cmd messages
|
||||||
@@ -35,7 +37,7 @@ vim.opt.tabstop = 4 -- Setting t
|
|||||||
vim.opt.termguicolors = true -- Enable the truecolor GUI colors in a terminal
|
vim.opt.termguicolors = true -- Enable the truecolor GUI colors in a terminal
|
||||||
vim.opt.undodir = os.getenv('HOME') .. '/.config/nvim/undodir' -- Set a specific undo file directory
|
vim.opt.undodir = os.getenv('HOME') .. '/.config/nvim/undodir' -- Set a specific undo file directory
|
||||||
vim.opt.undofile = true -- Enable undo files
|
vim.opt.undofile = true -- Enable undo files
|
||||||
vim.opt.updatetime = 50 -- Update time in milliseconds
|
vim.opt.updatetime = 300 -- Update time in milliseconds
|
||||||
vim.opt.wrap = false -- Do _not_ wrap lines
|
vim.opt.wrap = false -- Do _not_ wrap lines
|
||||||
|
|
||||||
vim.g.netrw_liststyle = 3 -- Use the tree style display for netrw directory listings
|
vim.g.netrw_liststyle = 3 -- Use the tree style display for netrw directory listings
|
||||||
|
|||||||
Reference in New Issue
Block a user