/dpp.vim

Dark powered plugin manager for Vim/neovim

Primary LanguageTypeScriptMIT LicenseMIT

dpp.vim

Dark Powered Plugin manager for Vim/neovim

If you don't want to configure plugins, you don't have to use the plugin manager. It does not work with zero configuration. You can use other plugin managers.

Doc

Please read help for details.

The development is supported by github sponsors. Thank you!

Note: If you want to know why I use Deno or what means "dark powered", please see "FAQ" section in help.

Introduction

Install

Note: Dpp.vim requires Neovim (0.10.0+ and of course, latest is recommended) or Vim 9.0.1276. See requirements if you aren't sure whether you have this.

Requirements

Dpp.vim requires both Deno and denops.vim.

Config example

Show Vim script configuration example using "~/.cache/dpp" as the base path location.
" Ward off unexpected things that your distro might have made, as
" well as sanely reset options when re-sourcing .vimrc
set nocompatible

" Set dpp base path (required)
const s:dpp_base = '~/.cache/dpp/'

" Set dpp source path (required)
const s:dpp_src = '~/.cache/dpp/repos/github.com/Shougo/dpp.vim'
const s:denops_src = '~/.cache/dpp/repos/github.com/denops/denops.vim'

" Set dpp runtime path (required)
execute 'set runtimepath^=' .. s:dpp_src

if s:dpp_base->dpp#min#load_state()
  " NOTE: dpp#make_state() requires denops.vim
  execute 'set runtimepath^=' .. s:denops_src
  autocmd User DenopsReady
  \ call dpp#make_state(s:dpp_base, '{TypeScript config file path}')
endif

" Attempt to determine the type of a file based on its name and
" possibly its " contents. Use this to allow intelligent
" auto-indenting " for each filetype, and for plugins that are
" filetype specific.
filetype indent plugin on

" Enable syntax highlighting
if has('syntax')
  syntax on
endif
Show Lua configuration using "~/.cache/dpp" as the base path location.
local dppSrc = "~/.cache/dpp/repos/github.com/Shougo/dpp.vim"
local denopsSrc = "~/.cache/dpp/repos/github.com/denops/denops.vim"

vim.opt.runtimepath:prepend(dppSrc)

local dpp = require("dpp")

local dppBase = "~/.cache/dpp"
if dpp.load_state(dppBase) then
  vim.opt.runtimepath:prepend(denopsSrc)

  vim.api.nvim_create_autocmd("User", {
    pattern = "DenopsReady",
    callback = function()
      vim.notify("dpp load_state() is failed")
      dpp.make_state(dppBase, {TypeScript config file path})
    end,
  })
end

vim.api.nvim_create_autocmd("User", {
  pattern = "Dpp:makeStatePost",
  callback = function()
    vim.notify("dpp make_state() is done")
  end,
})

vim.cmd("filetype indent plugin on")
vim.cmd("syntax on")

Extensions

Extensions implement fancy features like other plugin managers.

You can find other extensions by the topic.

Protocols

Protocols implement VCS related features.

You can find other protocols by the topic.