Nothing Special   »   [go: up one dir, main page]

Skip to content

Shougo/dpp.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Vim 9.1.0448+ or Neovim 0.10.0+. See requirements if you aren't sure whether you have this.

NOTE: To install plugins from remote, you need to install dpp-ext-installer.

Requirements

Please install both Deno 1.45+ and "denops.vim" v7.0+.

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)
" NOTE: The plugins must be cloned before.
const s:dpp_src = '~/.cache/dpp/repos/github.com/Shougo/dpp.vim'
const s:denops_src = '~/.cache/dpp/repos/github.com/denops/denops.vim'
"const s:denops_installer =
"\ '~/.cache/dpp/repos/github.com/Shougo/dpp-ext-installer'

" 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
  " NOTE: denops.vim and dpp plugins are must be added
  execute 'set runtimepath^=' .. s:denops_src
  "execute 'set runtimepath^=' .. s:denops_installer

  autocmd User DenopsReady
  \ : echohl WarningMsg
  \ | echomsg 'dpp load_state() is failed'
  \ | echohl NONE
  \ | call dpp#make_state(s:dpp_base, '{TypeScript config file path}')
endif

autocmd User Dpp:makeStatePost
      \ : echohl WarningMsg
      \ | echomsg 'dpp make_state() is done'
      \ | echohl NONE

" 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"
--local denopsInstaller =
--  "~/.cache/dpp/repos/github.com/Shougo/dpp-ext-installer"

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.opt.runtimepath:prepend(denopsInstaller)

  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.

About

Dark powered plugin manager for Vim/Neovim

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •