Giter VIP home page Giter VIP logo

depot.nvim's Introduction

Depot.nvim

A plugin to load project local settings into a local store.

Unlike other plugins like nvim-config-local or exrc *no code is executed. Rather, a configuration table is loaded into a global store and can be consumed throughout your config.

Have your config read your settings, rather than the settings modify your config.

Motivation

When bouncing between different project with different styles and cargo features it is often desired to have different settings for each project.

There are existing solutions for this, such as .exrc and nvim-config-local that allow loading lua code. While being flexible, they suffer security and interoperability issues.

As a result of the configurability of Neovim there are many attack surfaces and code injection. Not only from executing exrc files, but from injecting malicious or ill conceived Neovim options, such as makeprg or globals variables that plugins use to execute commands, or hooks.

Additionally, using a project local script makes it difficult to influence configurations of plugins, often requiring exposing the plugin config as a global for the exrc to modify before calling setup on your plugin.

depot.nvim mitigates these by loading settings as inert json, and then publishing it to your config, where you can validate and selectively choose which keys to read and use. You are in control of which settings go where, rather than dumping them into globals or options, where options such as makeprg or other lsp build scripts can be set to malicious values.

It allows consuming the most recent settings where and when it is needed, which allows you to load plugins or configure an LSP hydrated using the keys and values of your choosing when it is needed.

depot.nvim's People

Contributors

ten3roberts avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.