[nvim-new] Start work
This commit is contained in:
parent
040cf4f54a
commit
711aa4510d
|
@ -0,0 +1 @@
|
||||||
|
# WIP!!!
|
|
@ -0,0 +1,12 @@
|
||||||
|
local init_modules = {
|
||||||
|
"aly.plugins",
|
||||||
|
"aly.options"
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, module in ipairs(init_modules) do
|
||||||
|
local ok, err = pcall(require, module)
|
||||||
|
if not ok then
|
||||||
|
error("Error loading " .. module .. "\n\n" .. err)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
" 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
|
|
@ -0,0 +1,12 @@
|
||||||
|
print("yes")
|
||||||
|
|
||||||
|
local options = {
|
||||||
|
termguicolors = true, -- how do I even use the editor without this?
|
||||||
|
}
|
||||||
|
|
||||||
|
for o, _ in pairs(options) do
|
||||||
|
vim.opt[o] = _
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd("filetype plugin indent on")
|
||||||
|
vim.cmd("syntax enable")
|
|
@ -0,0 +1,47 @@
|
||||||
|
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",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = {
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
dependencies = { "hrsh7th/nvim-cmp" },
|
||||||
|
config = function()
|
||||||
|
require("nvim-autopairs").setup {}
|
||||||
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.event:on(
|
||||||
|
'confirm_done',
|
||||||
|
cmp_autopairs.on_confirm_done()
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}, {})
|
Loading…
Reference in New Issue