mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim-new] Somewhat functional plugin-based config
This commit is contained in:
parent
711aa4510d
commit
03f55f89fd
3 changed files with 51 additions and 46 deletions
|
@ -1,5 +1,5 @@
|
|||
local init_modules = {
|
||||
"aly.plugins",
|
||||
-- "aly.plugins",
|
||||
"aly.options"
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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" },
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue