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')
|
||||
end, { nargs = '*' })
|
||||
|
||||
--vim.api.nvim_create_user_command('TSI', function (opts)
|
||||
--
|
||||
--end)
|
||||
-- TODO: Set up a command for installing treesitter plugins via luarocks
|
||||
vim.api.nvim_create_user_command('TSI', function(opts)
|
||||
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
|
||||
require('plugins.gruvbox') -- Colorscheme setup
|
||||
@@ -7,28 +12,26 @@ require('plugins.lualine') -- Status line plugin
|
||||
-- vim.schedule defers plugin loading for after the main loop starts
|
||||
-- Startup is cleaner and faster than ever
|
||||
vim.schedule(function()
|
||||
require('plugins.language_support') -- LSP, treesitter and any other language specific support plugins
|
||||
require('plugins.gitsigns') -- Git gutter notifiers
|
||||
require('plugins.nvim-cmp') -- Autocompletion plugin (TODO: Move to builtin completion?)
|
||||
require('plugins.telescope') -- Floating window fuzzy searching different sources
|
||||
require('plugins.telekasten') -- Note taking plugins
|
||||
require('plugins.mason') -- LSP and DAP manager
|
||||
require('plugins.twilight') -- Focus mode, dim lines around the cursor's location
|
||||
require('plugins.render-markdown') -- Render markdown directly in neovim
|
||||
require('plugins.luasnip') -- Snippet engine
|
||||
require('plugins.language_support') -- LSP, treesitter and any other language specific support plugins
|
||||
require('plugins.gitsigns') -- Git gutter notifiers
|
||||
require('plugins.nvim-cmp') -- Autocompletion plugin (TODO: Move to builtin completion?)
|
||||
require('plugins.telescope') -- Floating window fuzzy searching different sources
|
||||
require('plugins.telekasten') -- Note taking plugins
|
||||
require('plugins.mason') -- LSP and DAP manager
|
||||
require('plugins.twilight') -- Focus mode, dim lines around the cursor's location
|
||||
require('plugins.render-markdown') -- Render markdown directly in neovim
|
||||
require('plugins.luasnip') -- Snippet engine
|
||||
|
||||
vim.pack.add({ 'https://github.com/windwp/nvim-autopairs' }) -- Autocomplete symbol pairs when typing
|
||||
vim.pack.add({ 'https://github.com/tpope/vim-surround' }) -- Change surrounding characters (doesn't need setup called)
|
||||
vim.pack.add({ 'https://github.com/tpope/vim-fugitive' }) -- _The_ Git integration plugin people have been using forever
|
||||
vim.pack.add({ 'https://github.com/habamax/vim-godot' }) -- Godot specific bindings and debug
|
||||
vim.pack.add({
|
||||
'https://github.com/windwp/nvim-autopairs', -- Autocomplete symbol pairs when typing
|
||||
'https://github.com/tpope/vim-surround', -- Change surrounding characters (doesn't need setup called)
|
||||
'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('plugins.dap') -- DAP debugging plugin
|
||||
require('plugins.dap-python') -- Debug plugin settings specifically for python
|
||||
require('plugins.yaml-companion') -- Additional YAML and JSON schema helper
|
||||
require('nvim-autopairs').setup() -- Automatic pair completion of paranteticals, braces, quotes, etc.
|
||||
require('plugins.dap') -- DAP debugging plugin
|
||||
require('plugins.dap-python') -- Debug plugin settings specifically for python
|
||||
require('plugins.yaml-companion') -- Additional YAML and JSON schema helper
|
||||
require('plugins.nvim-lint') -- Linter loader
|
||||
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 {
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
require('lint').linters_by_ft = {
|
||||
yaml = { 'cfn_lint' }
|
||||
}
|
||||
vim.pack.add({
|
||||
'https://github.com/mfussenegger/nvim-lint'
|
||||
})
|
||||
|
||||
-- vim.api.nvim_create_autocmd({ 'BufWritePost', 'BufReadPost' }, {
|
||||
-- callback = function()
|
||||
-- require('lint').try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
';l',
|
||||
function()
|
||||
require('lint').try_lint()
|
||||
end
|
||||
},
|
||||
},
|
||||
require('lint').linters_by_ft = {
|
||||
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' }, {
|
||||
-- callback = function()
|
||||
-- require('lint').try_lint()
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
vim.keymap.set('n', ';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.number = true -- Show the line number in the gutter.
|
||||
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.shiftwidth = 4 -- Number of spaces a tab counts for when converting tabs to spaces
|
||||
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.undodir = os.getenv('HOME') .. '/.config/nvim/undodir' -- Set a specific undo file directory
|
||||
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.g.netrw_liststyle = 3 -- Use the tree style display for netrw directory listings
|
||||
|
||||
Reference in New Issue
Block a user