Commit nvim configuration

This commit is contained in:
2024-08-07 00:36:20 -05:00
parent daffcc3915
commit ed7a46b460
28 changed files with 395 additions and 0 deletions

View File

@ -0,0 +1,5 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
}

View File

@ -0,0 +1,53 @@
return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"neovim/nvim-lspconfig",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"saadparwaiz1/cmp_luasnip",
},
opts = function()
local cmp = require("cmp")
require("luasnip.loaders.from_vscode").lazy_load()
return {
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
}
end,
--[[
keys = {
{ "<C-b>", function() require('cmp').mapping.scroll_docs(-4) end },
{ "<C-f>", function() require('cmp').mapping.scroll_docs(4) end },
{ "<C-Space>", function() require('cmp').mapping.complete() end },
{ "<C-e>", function() require('cmp').mapping.abort() end },
{ "<CR>", function() require('cmp').mapping.confirm({ select = true }) end },
},
]]
--
},
}

View File

@ -0,0 +1,8 @@
return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
lua = { "stylua" },
},
},
}

View File

@ -0,0 +1,12 @@
return {
"neanias/everforest-nvim",
version = false,
lazy = false,
priority = 1000, -- make sure to load this before all the other start plugins
-- Optional; default configuration will be used if setup isn't called.
config = function()
require("everforest").setup({
-- Your config here
})
end,
}

View File

@ -0,0 +1,2 @@
-- return { "mhartington/formatter.nvim" }
return {}

View File

@ -0,0 +1,11 @@
return {
{
"tpope/vim-fugitive",
},
{
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
},
}

View File

@ -0,0 +1,3 @@
return {
"ellisonleao/gruvbox.nvim",
}

View File

@ -0,0 +1,6 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = {
},
}

View File

@ -0,0 +1,3 @@
return {
"rebelot/kanagawa.nvim",
}

View File

@ -0,0 +1,3 @@
return {
"mfussenegger/nvim-lint",
}

View File

@ -0,0 +1,52 @@
return {
{
"williamboman/mason.nvim",
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
dependencies = { "williamboman/mason.nvim" },
config = function()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"ruby_lsp",
"standardrb",
"terraformls",
"yamlls",
},
})
end,
},
{
"neovim/nvim-lspconfig",
dependencies = { "williamboman/mason-lspconfig.nvim" },
config = function()
local lspconfig = require("lspconfig")
lspconfig.ruby_lsp.setup({})
lspconfig.standardrb.setup({})
lspconfig.bashls.setup({})
lspconfig.yamlls.setup({})
lspconfig.terraformls.setup({})
lspconfig.lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
format = {
defaultConfig = {
indent_style = "tabs",
indent_size = "4",
},
enable = true,
},
},
},
})
end,
},
}

View File

@ -0,0 +1,8 @@
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = function()
return {}
end,
}

View File

@ -0,0 +1,7 @@
return {
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
},
}

View File

@ -0,0 +1,9 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
}

View File

@ -0,0 +1 @@
return { "EdenEast/nightfox.nvim" }

View File

@ -0,0 +1,3 @@
return {
"shaunsingh/nord.nvim",
}

View File

@ -0,0 +1,7 @@
return {
"stevearc/oil.nvim",
opts = {},
-- Optional dependencies
dependencies = { { "echasnovski/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
}

View File

@ -0,0 +1 @@
return { "rose-pine/neovim", name = "rose-pine" }

View File

@ -0,0 +1,10 @@
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
})
end,
}

View File

@ -0,0 +1,33 @@
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
"nvim-lua/plenary.nvim",
},
keys = {
{
"<leader>ff",
function()
require("telescope.builtin").find_files()
end,
},
{
"<leader>fg",
function()
require("telescope.builtin").live_grep()
end,
},
{
"<leader>fb",
function()
require("telescope.builtin").buffers()
end,
},
{
"<leader>fh",
function()
require("telescope.builtin").help_tags()
end,
},
},
}

View File

@ -0,0 +1,6 @@
return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
}

View File

@ -0,0 +1,22 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = {
build = ":TSUpdate",
ensure_installed = {
"ruby",
"lua",
"hcl",
"terraform",
},
auto_install = true,
highlight = {
enable = true,
},
indent = {
enable = false,
},
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
}

View File

@ -0,0 +1,37 @@
return {
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}

View File

@ -0,0 +1,7 @@
return {
"mbbill/undotree",
keys = {
{ "<leader>u", vim.cmd.UndotreeToggle },
},
}