Skip to content

Safely load your project specific configurations written in json, lua or vimscript

License

Notifications You must be signed in to change notification settings

creativenull/projectlocal.vim

Repository files navigation

projectlocal.vim

Deno 1.45 or above Vim 9.1.0448 or above Neovim 0.10.0 or above

Load your vim project local configurations safely, for vim and neovim. Written with ♥ in TypeScript and Deno (denops.vim).

This is a combination of my projectcmd.vim and projectcmd.nvim plugins with the aim to unify both plugins to support both vim and neovim.

Features

  • Setup configurations on a per-project basis
  • Write your configurations in a vimscript, lua or json file
  • Run only on user permission - when a config file is found inside a project, the user will get to decide whether to run those configurations or not

Requirements

Installation

You must have deno installed for this plugin to work on your machine

Below are examples on installing the plugin with a plugin manager or utilizing vim packages.

vim-plug

Plug 'vim-denops/denops.vim'
Plug 'creativenull/projectlocal.vim'

" Or use with tag (optional)
" Plug 'creativenull/projectlocal.vim', { 'tag': 'v1.*' }

packer.nvim

use {
    'creativenull/projectlocal.vim',
    tag = 'v1.*', -- optional
    requires = { 'vim-denops/denops.vim' },
}

lazy.nvim

{
    'creativenull/projectlocal.vim',
    version = 'v1.x.x', -- optional
    dependencies = { 'vim-denops/denops.vim' }
}

Without any manager

Vim

git clone --depth 1 --branch v1.0.0 https://github.com/creativenull/projectlocal.vim ~/.vim/pack/creativenull/start/projectlocal.vim

Neovim

git clone --depth 1 --branch v1.0.0 https://github.com/creativenull/projectlocal.vim ~/.local/share/nvim/site/pack/creativenull/start/projectlocal.vim

How to use

Check the How to use section in the Wiki page.

Motivation

Read why I created this plugin in the Motivation wiki page.

Documentation

The documentation can be found over at docs/projectlocal.txt and via vim/nvim after installation with :help projectlocal.

For a JSON config file check :help projectlocal-json-config.

Contributing

Make sure you have Deno installed. If you encounter a bug or have an issue, you can make PR with your reasoning. But I would recommend you create an Issue first before making a PR to expand more on the issue you're having.