[nvim-new] Somewhat functional plugin-based config

This commit is contained in:
Alyxia Sother 2023-08-29 20:00:10 +02:00
parent 711aa4510d
commit 03f55f89fd
No known key found for this signature in database
GPG key ID: 0B2497099595CAA5
3 changed files with 51 additions and 46 deletions

View file

@ -1,5 +1,5 @@
local init_modules = {
"aly.plugins",
-- "aly.plugins",
"aly.options"
}

View file

@ -1,16 +0,0 @@
" Honestly, the only reason this file is even here is because of the stupid
" runtimepath. Nothing else.
let g:nvim_dotfiles_dir = expand('<sfile>:p:h')
" <https://github.com/dmitmel/dotfiles/blob/744f5294773111a3a2c778f34273e67b40c66671/nvim/init.vim#L24-L34>
function! s:configure_runtimepath() abort
let rtp = split(&runtimepath, ',')
let dotf = g:nvim_dotfiles_dir
if index(rtp, dotf ) < 0 | call insert(rtp, dotf ) | endif
if index(rtp, dotf.'/after') < 0 | call add(rtp, dotf.'/after') | endif
let &runtimepath = join(rtp, ',')
endfunction
call s:configure_runtimepath()
luafile <sfile>:h/init.lua

View file

@ -1,35 +1,53 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- {
-- "neovim/nvim-lspconfig",
-- dependencies = {
-- { "williamboman/mason.nvim", config = true },
-- "williamboman/mason-lspconfig.nvim",
-- { "j-hui/fidget.nvim", tag = "legacy", opts = {} },
--
-- "folke/neodev.nvim",
-- },
-- },
return {
-- the colorscheme should be available when starting Neovim
{
"hrsh7th/nvim-cmp",
"folke/tokyonight.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
vim.cmd([[colorscheme tokyonight]])
end,
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
{ "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } },
{ "folke/neodev.nvim", opts = {} },
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
{ "j-hui/fidget.nvim", tag = "legacy", opts = {} },
"hrsh7th/cmp-nvim-lsp",
},
config = function() end,
opts = {
servers = {
lua_ls = {}
}
}
},
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
},
opts = function()
local cmp = require("cmp")
return {
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
}),
}
end
},
{
"windwp/nvim-autopairs",
@ -44,4 +62,7 @@ require("lazy").setup({
)
end,
},
}, {})
{ "nvim-tree/nvim-web-devicons", lazy = true },
{ "stevearc/dressing.nvim", event = "VeryLazy" },
}