Commit nvim configuration
This commit is contained in:
parent
daffcc3915
commit
ed7a46b460
2
.config/nvim/init.lua
Normal file
2
.config/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
||||
require("config.lazy")
|
||||
require("vim-options")
|
39
.config/nvim/lazy-lock.json
Normal file
39
.config/nvim/lazy-lock.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" },
|
||||
"catppuccin": { "branch": "main", "commit": "05206bbb6d500a339cd55a9486532c3871a4455e" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "eff40c4f5fdf7ae8f269b258047d1bd7cee50f02" },
|
||||
"everforest-nvim": { "branch": "main", "commit": "2c40c11b971da120796564e69aecce7e7c82a854" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.icons": { "branch": "main", "commit": "fe63fe080e76d80713557e5f0c65bc15b14b152d" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "d3e8b1acc095baf57af81bb5e89fe7c4359eb619" },
|
||||
"nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "6c505d4220b521f3b0e7b645f6ce45fa914d0eed" },
|
||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "9e66d5c72dabfc6417c6015ed8991f3c4b504f7d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
|
||||
"oil.nvim": { "branch": "master", "commit": "fcca212c2e966fc3dec1d4baf888e670631d25d1" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"rose-pine": { "branch": "main", "commit": "1e45cea06db866143930a6df96fc66bf715c866c" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" }
|
||||
}
|
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,35 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
5
.config/nvim/lua/plugins/catppuccin.lua
Normal file
5
.config/nvim/lua/plugins/catppuccin.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
}
|
53
.config/nvim/lua/plugins/cmp.lua
Normal file
53
.config/nvim/lua/plugins/cmp.lua
Normal 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 },
|
||||
},
|
||||
]]
|
||||
--
|
||||
},
|
||||
}
|
8
.config/nvim/lua/plugins/conform.lua
Normal file
8
.config/nvim/lua/plugins/conform.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
},
|
||||
}
|
12
.config/nvim/lua/plugins/everforest.lua
Normal file
12
.config/nvim/lua/plugins/everforest.lua
Normal 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,
|
||||
}
|
2
.config/nvim/lua/plugins/formatter.lua
Normal file
2
.config/nvim/lua/plugins/formatter.lua
Normal file
@ -0,0 +1,2 @@
|
||||
-- return { "mhartington/formatter.nvim" }
|
||||
return {}
|
11
.config/nvim/lua/plugins/gitsigns.lua
Normal file
11
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,11 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
},
|
||||
}
|
3
.config/nvim/lua/plugins/gruvbox.lua
Normal file
3
.config/nvim/lua/plugins/gruvbox.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
}
|
6
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
6
.config/nvim/lua/plugins/indent-blankline.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
opts = {
|
||||
},
|
||||
}
|
3
.config/nvim/lua/plugins/kanagawa.lua
Normal file
3
.config/nvim/lua/plugins/kanagawa.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"rebelot/kanagawa.nvim",
|
||||
}
|
3
.config/nvim/lua/plugins/lint.lua
Normal file
3
.config/nvim/lua/plugins/lint.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
}
|
52
.config/nvim/lua/plugins/lspconfig.lua
Normal file
52
.config/nvim/lua/plugins/lspconfig.lua
Normal 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,
|
||||
},
|
||||
}
|
8
.config/nvim/lua/plugins/lualine.lua
Normal file
8
.config/nvim/lua/plugins/lualine.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = function()
|
||||
return {}
|
||||
end,
|
||||
}
|
7
.config/nvim/lua/plugins/luasnip.lua
Normal file
7
.config/nvim/lua/plugins/luasnip.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
}
|
9
.config/nvim/lua/plugins/neo-tree.lua
Normal file
9
.config/nvim/lua/plugins/neo-tree.lua
Normal 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",
|
||||
},
|
||||
}
|
1
.config/nvim/lua/plugins/nightfox.lua
Normal file
1
.config/nvim/lua/plugins/nightfox.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "EdenEast/nightfox.nvim" }
|
3
.config/nvim/lua/plugins/nord.lua
Normal file
3
.config/nvim/lua/plugins/nord.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"shaunsingh/nord.nvim",
|
||||
}
|
7
.config/nvim/lua/plugins/oil.lua
Normal file
7
.config/nvim/lua/plugins/oil.lua
Normal 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
|
||||
}
|
1
.config/nvim/lua/plugins/rose-pine.lua
Normal file
1
.config/nvim/lua/plugins/rose-pine.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "rose-pine/neovim", name = "rose-pine" }
|
10
.config/nvim/lua/plugins/surround.lua
Normal file
10
.config/nvim/lua/plugins/surround.lua
Normal 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,
|
||||
}
|
33
.config/nvim/lua/plugins/telescope.lua
Normal file
33
.config/nvim/lua/plugins/telescope.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
}
|
6
.config/nvim/lua/plugins/tokyonight.lua
Normal file
6
.config/nvim/lua/plugins/tokyonight.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
}
|
22
.config/nvim/lua/plugins/treesitter.lua
Normal file
22
.config/nvim/lua/plugins/treesitter.lua
Normal 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,
|
||||
}
|
37
.config/nvim/lua/plugins/trouble.lua
Normal file
37
.config/nvim/lua/plugins/trouble.lua
Normal 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)",
|
||||
},
|
||||
},
|
||||
}
|
7
.config/nvim/lua/plugins/undotree.lua
Normal file
7
.config/nvim/lua/plugins/undotree.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
|
||||
keys = {
|
||||
{ "<leader>u", vim.cmd.UndotreeToggle },
|
||||
},
|
||||
}
|
10
.config/nvim/lua/vim-options.lua
Normal file
10
.config/nvim/lua/vim-options.lua
Normal file
@ -0,0 +1,10 @@
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=4")
|
||||
vim.cmd("set softtabstop=4")
|
||||
vim.cmd("set shiftwidth=4")
|
||||
vim.cmd("set smartindent")
|
||||
|
||||
vim.wo.number = true
|
||||
vim.cmd.colorscheme "tokyonight"
|
||||
|
||||
vim.opt.termguicolors = true
|
Loading…
Reference in New Issue
Block a user