Initial Nvim Config Commit

This commit is contained in:
Steven Medeiros Melo
2024-02-23 20:12:22 -05:00
commit 48426854e1
29 changed files with 1003 additions and 0 deletions

91
lua/plugins/cmp.lua Normal file
View File

@@ -0,0 +1,91 @@
-- print('test')
local enabled_lsps = {
"pyright",
"tsserver",
"clangd",
"gopls",
"rust_analyzer",
"taplo",
"graphql"
}
return {
-- "L3MON4D3/LuaSnip",
-- {
"hrsh7th/nvim-cmp",
event = 'InsertEnter',
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
},
config = function()
local cmp = require'cmp'
local ls = require('luasnip')
cmp.setup({
snippets = {
expand = function(args)
ls.lsp_expand(args.body)
end,
},
sources = {
{ name = 'luasnip' },
},
})
end,
-- },
-- 'saadparwaiz1/cmp_luasnip',
-- config = function()
--
-- end,
--
-- config = function()
-- local cmp = require('cmp')
--
-- cmp.setup({
-- snippet = {
-- expand = function(args)
-- vim.fn["luasnip#anonymous"](args.body)
-- end,
-- },
-- window = {
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
-- },
-- 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-y>'] = cmp.config.disable,
-- ['<C-e>'] = cmp.mapping({
-- i = cmp.mapping.abort(),
-- c = cmp.mapping.close(),
-- }),
-- ['<CR>'] = cmp.mapping.confirm({ select = true }),
-- }),
-- sources = cmp.config.sources({
-- { name = 'nvim_lsp' },
-- { name = 'luasnip' },
-- }, {
-- { name = 'buffer' },
-- })
-- })
--
-- end,
--
-- build = function()
-- local lspconfig = require('lspconfig')
-- for i, lsp in ipairs(enabled_lsps) do
-- lspconfig[lsp].setup({
-- capabilities = capabilities
-- })
-- end
-- end,
}

6
lua/plugins/harpoon.lua Normal file
View File

@@ -0,0 +1,6 @@
-- lua/plugins/harpoon.lua
-- print('harpoon.lua loaded')
return {
"ThePrimeagen/harpoon",
}

View File

@@ -0,0 +1,5 @@
-- lua/plugins/indent-blankline.lua
return {
"lukas-reineke/indent-blankline.nvim",
}

44
lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,44 @@
-- lua/plugins/lsp.lua
-- print('lsp.lua loaded')
return {
"neovim/nvim-lspconfig",
lazy = false,
priority = 900,
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function()
local lspconfig = require("lspconfig")
local mason = require("mason")
local masonlsp = require("mason-lspconfig")
mason.setup()
masonlsp.setup()
-- lspconfig.setup({})
lspconfig.pyright.setup({})
lspconfig.tsserver.setup({})
lspconfig.clangd.setup({})
lspconfig.gopls.setup({})
lspconfig.rust_analyzer.setup({})
lspconfig.taplo.setup({})
lspconfig.graphql.setup({})
lspconfig.lua_ls.setup({
settings = {
diagnostics = {
global = {
'vim',
'require'
},
},
},
})
lspconfig.vimls.setup({})
-- lspconfig.rust_analyzer.setup({})
-- lspconfig.lua_ls.setup({})
end,
}

108
lua/plugins/lualine.lua Normal file
View File

@@ -0,0 +1,108 @@
-- lua/plugins/lualine.lua
return {
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local lualine = require('lualine')
lualine.setup({
options = {
theme = 'auto',
-- fmt = default,
-- fmt = string.upper,
ignore_focus = {
},
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
},
},
sections = {
lualine_a = {
-- {
-- 'windows'
-- },
{
'diff',
colored = true,
diff_color = {
added = 'LuaLineDiffAdd',
modified = 'LuaLineDiffChange',
removed = 'LuaLineDiffDelete',
},
},
-- {
-- 'buffers',
-- show_filename_only = true,
-- show_modified_status = false,
--
-- mode = 4,
--
-- filetype_names = {
-- NvimTree = 'NvimTree'
-- },
-- },
{
'mode',
fmt = function(str) return '[' .. str:sub(1,1) .. ']' end,
},
},
lualine_b = {
{ 'branch' }
},
lualine_c = {
{
'filename',
file_status = true,
newfile_status = false,
path = 0,
fmt = string.lower,
shorting_target = 40,
symbols = {
modified = '[+]',
readonly = '[-]',
unamed = '[No Name]',
newfile = '[New]',
},
}
},
lualine_x = {
{
require("lazy.status").updates,
cond = require("lazy.status").has_updates,
color = { fg = "#ff9e64" },
},
{
'encoding'
},
{
'filetype',
colored = true,
icons_enabled = true,
icon_only = true,
icon = { align='center' }
}
},
lualine_y = {
{
'progress',
},
},
lualine_z = {
{
'location',
},
},
},
})
end,
}

10
lua/plugins/nvimtree.lua Normal file
View File

@@ -0,0 +1,10 @@
-- lua/plugins/nvimtree.lua
-- print('nvimtree.lua loaded')
return {
"nvim-tree/nvim-tree.lua",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
}

12
lua/plugins/oxocarbon.lua Normal file
View File

@@ -0,0 +1,12 @@
-- lua/plugin/oxocarbon.lua
-- print('oxocarbon.lua loaded')
return {
"nyoom-engineering/oxocarbon.nvim",
"",
lazy = false,
priority = 1000,
config = function()
vim.cmd.colorscheme('oxocarbon')
end,
}

11
lua/plugins/telescope.lua Normal file
View File

@@ -0,0 +1,11 @@
-- lua/plugins/telescope.lua
-- print('telescope.lua loaded')
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim"
},
}

View File

@@ -0,0 +1,12 @@
-- lua/plugins/treesitter.lua
-- print('treesitter.lua loaded')
return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
build = ":TSUpdate",
}

20
lua/plugins/ui.lua Normal file
View File

@@ -0,0 +1,20 @@
-- lua/plugin/oxocarbon.lua
-- print('oxocarbon.lua loaded')
return {
{
"nyoom-engineering/oxocarbon.nvim",
lazy = false,
priority = 1000,
},
{
'kepano/flexoki-neovim',
name = 'flexoki',
lazy = false,
priority = 1000,
},
-- config = function()
-- vim.cmd.colorscheme('oxocarbon')
-- end,
}

14
lua/plugins/wichkey.lua Normal file
View File

@@ -0,0 +1,14 @@
return {
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}