2023-11-14 11:52:51 -05:00
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
|
|
if not vim.loop.fs_stat(lazypath) then
|
2023-11-16 10:27:01 -05:00
|
|
|
vim.fn.system({
|
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--filter=blob:none",
|
|
|
|
"https://github.com/folke/lazy.nvim.git",
|
|
|
|
"--branch=stable", -- latest stable release
|
|
|
|
lazypath,
|
|
|
|
})
|
2023-11-14 11:52:51 -05:00
|
|
|
end
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
|
|
|
return require('lazy').setup({
|
2023-11-16 10:27:01 -05:00
|
|
|
{
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
version = '0.1.0',
|
|
|
|
-- or , branch = '0.1.x',
|
|
|
|
dependencies = { { 'nvim-lua/plenary.nvim' } }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'navarasu/onedark.nvim',
|
|
|
|
name = 'onedark',
|
|
|
|
config = function()
|
|
|
|
vim.cmd('colorscheme onedark')
|
|
|
|
end
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"folke/trouble.nvim",
|
|
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
2023-11-14 11:52:51 -05:00
|
|
|
opts = {},
|
2023-11-16 10:27:01 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'nvim-tree/nvim-tree.lua',
|
|
|
|
dependencies = {
|
|
|
|
'nvim-tree/nvim-web-devicons', -- optional
|
|
|
|
},
|
|
|
|
},
|
2023-11-14 11:52:51 -05:00
|
|
|
|
2023-11-14 13:34:13 -05:00
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
build = ":TSUpdate",
|
2023-11-16 11:14:18 -05:00
|
|
|
|
|
|
|
dependencies = {
|
|
|
|
'JoosepAlviste/nvim-ts-context-commentstring',
|
2024-01-23 23:47:19 -05:00
|
|
|
"nvim-treesitter/playground",
|
2023-11-16 11:14:18 -05:00
|
|
|
},
|
|
|
|
|
2023-11-16 10:27:01 -05:00
|
|
|
config = function()
|
|
|
|
local configs = require("nvim-treesitter.configs")
|
2023-11-14 13:34:13 -05:00
|
|
|
|
2023-11-16 10:27:01 -05:00
|
|
|
configs.setup({
|
|
|
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "javascript", "html", "go", "yaml", "bash" },
|
|
|
|
sync_install = false,
|
|
|
|
highlight = { enable = true },
|
|
|
|
indent = { enable = true },
|
2024-01-23 23:47:19 -05:00
|
|
|
playground = { enable = true },
|
2023-11-14 13:34:13 -05:00
|
|
|
})
|
2023-12-14 21:40:48 -05:00
|
|
|
|
2024-01-23 23:47:19 -05:00
|
|
|
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
|
|
|
|
parser_config.logstash = {
|
2024-08-05 21:05:33 -04:00
|
|
|
install_info = {
|
|
|
|
url = "https://git.preston-baxter.com/Preston_PLB/tree-sitter-logstash.git", -- local path or git repo
|
|
|
|
files = { "src/parser.c" }, -- note that some parsers also require src/scanner.c or src/scanner.cc
|
|
|
|
-- optional entries:
|
|
|
|
branch = "master", -- default branch in case of git repo if different from master
|
|
|
|
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
|
|
|
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
|
|
|
|
},
|
2024-01-23 23:47:19 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
vim.filetype.add({
|
|
|
|
extension = {
|
|
|
|
logstash = "logstash"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
vim.treesitter.language.register("logstash", "logstash")
|
|
|
|
|
2023-12-14 21:40:48 -05:00
|
|
|
require('ts_context_commentstring').setup {
|
|
|
|
enable_autocmd = false
|
|
|
|
}
|
2023-11-14 13:34:13 -05:00
|
|
|
end
|
2023-11-16 10:27:01 -05:00
|
|
|
},
|
|
|
|
"nvim-pack/nvim-spectre",
|
|
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
|
|
{
|
|
|
|
'VonHeikemen/lsp-zero.nvim',
|
|
|
|
branch = 'v1.x',
|
|
|
|
dependencies = {
|
|
|
|
-- LSP Support
|
|
|
|
{ 'neovim/nvim-lspconfig' },
|
|
|
|
{ 'williamboman/mason.nvim' },
|
|
|
|
{ 'williamboman/mason-lspconfig.nvim' },
|
2023-11-14 11:52:51 -05:00
|
|
|
|
2023-11-16 10:27:01 -05:00
|
|
|
-- Autocompletion
|
|
|
|
{ 'hrsh7th/nvim-cmp' },
|
|
|
|
{ 'hrsh7th/cmp-buffer' },
|
|
|
|
{ 'hrsh7th/cmp-path' },
|
|
|
|
{ 'saadparwaiz1/cmp_luasnip' },
|
|
|
|
{ 'hrsh7th/cmp-nvim-lsp' },
|
|
|
|
{ 'hrsh7th/cmp-nvim-lua' },
|
2023-11-14 11:52:51 -05:00
|
|
|
|
2023-11-16 10:27:01 -05:00
|
|
|
-- Snippets
|
|
|
|
{ 'L3MON4D3/LuaSnip' },
|
|
|
|
{ 'rafamadriz/friendly-snippets' },
|
|
|
|
}
|
|
|
|
},
|
2023-11-14 11:52:51 -05:00
|
|
|
{
|
|
|
|
"vrischmann/tree-sitter-templ",
|
2023-11-16 10:27:01 -05:00
|
|
|
config = function()
|
|
|
|
local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
|
|
|
treesitter_parser_config.templ = {
|
|
|
|
install_info = {
|
|
|
|
url = "https://github.com/vrischmann/tree-sitter-templ.git",
|
|
|
|
files = { "src/parser.c", "src/scanner.c" },
|
|
|
|
branch = "master",
|
|
|
|
},
|
|
|
|
}
|
2024-01-23 23:47:19 -05:00
|
|
|
--[[ vim.api.nvim_create_autocmd(
|
2023-11-16 10:27:01 -05:00
|
|
|
{
|
|
|
|
-- 'BufWritePre' event triggers just before a buffer is written to file.
|
|
|
|
"BufWritePre"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern = { "*.templ" },
|
|
|
|
callback = function()
|
|
|
|
-- Format the current buffer using Neovim's built-in LSP (Language Server Protocol).
|
|
|
|
vim.lsp.buf.format()
|
|
|
|
end,
|
|
|
|
}
|
2024-01-23 23:47:19 -05:00
|
|
|
) ]]
|
2023-11-16 10:27:01 -05:00
|
|
|
vim.treesitter.language.register('templ', 'templ')
|
|
|
|
end,
|
2023-11-14 11:52:51 -05:00
|
|
|
dependencies = {
|
|
|
|
{ "nvim-treesitter/nvim-treesitter" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2023-11-16 10:27:01 -05:00
|
|
|
"ray-x/lsp_signature.nvim",
|
|
|
|
event = "VeryLazy",
|
|
|
|
opts = {},
|
|
|
|
config = function(_, opts) require 'lsp_signature'.setup(opts) end
|
2023-11-14 11:52:51 -05:00
|
|
|
},
|
2023-12-14 21:40:48 -05:00
|
|
|
{ 'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons' },
|
2023-11-14 13:34:13 -05:00
|
|
|
{
|
2023-11-16 10:27:01 -05:00
|
|
|
"kdheepak/lazygit.nvim",
|
|
|
|
-- optional for floating window border decoration
|
|
|
|
dependencies = {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
},
|
|
|
|
},
|
2023-11-16 11:14:18 -05:00
|
|
|
{
|
|
|
|
'numToStr/Comment.nvim',
|
|
|
|
opts = {
|
|
|
|
toggler = {
|
|
|
|
---Line-comment toggle keymap
|
|
|
|
line = '<leader>/',
|
|
|
|
---Block-comment toggle keymap
|
|
|
|
block = '<leader>b',
|
|
|
|
},
|
|
|
|
---LHS of operator-pending mappings in NORMAL and VISUAL mode
|
|
|
|
opleader = {
|
|
|
|
---Line-comment keymap
|
2024-01-23 23:50:50 -05:00
|
|
|
line = '<leader>/',
|
2023-11-16 11:14:18 -05:00
|
|
|
---Block-comment keymap
|
2024-01-23 23:50:50 -05:00
|
|
|
block = '<leader>B',
|
2023-11-16 11:14:18 -05:00
|
|
|
},
|
|
|
|
---LHS of extra mappings
|
|
|
|
extra = {
|
|
|
|
---Add comment on the line above
|
|
|
|
above = '<leader>CO',
|
|
|
|
---Add comment on the line below
|
|
|
|
below = '<leader>Co',
|
|
|
|
---Add comment at the end of line
|
|
|
|
eol = '<leader>CA',
|
|
|
|
},
|
|
|
|
---Enable keybindings
|
|
|
|
---NOTE: If given `false` then the plugin won't create any mappings
|
|
|
|
mappings = {
|
|
|
|
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
|
|
|
basic = true,
|
|
|
|
---Extra mapping; `gco`, `gcO`, `gcA`
|
|
|
|
extra = true,
|
|
|
|
},
|
2024-01-23 23:50:50 -05:00
|
|
|
|
2023-11-16 11:14:18 -05:00
|
|
|
},
|
|
|
|
lazy = false,
|
2023-11-21 10:26:24 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
|
|
|
},
|
2023-12-14 21:40:48 -05:00
|
|
|
{ 'f-person/git-blame.nvim' },
|
|
|
|
{ 'simrat39/symbols-outline.nvim' },
|
|
|
|
{
|
|
|
|
'leoluz/nvim-dap-go',
|
2024-08-05 21:05:33 -04:00
|
|
|
dependencies = { 'mfussenegger/nvim-dap', "nvim-neotest/nvim-nio" }
|
2023-12-14 21:40:48 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'rcarriga/nvim-dap-ui',
|
|
|
|
dependencies = { 'mfussenegger/nvim-dap' }
|
2024-08-05 21:05:33 -04:00
|
|
|
},
|
|
|
|
{ 'github/copilot.vim' }
|
2023-11-14 11:52:51 -05:00
|
|
|
})
|