Skip to content

Latest commit

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation


PenVim

project's root directory and documents indentation detector with project based config loader


Table Of Contents

About The Project

This plugin (Penvim) has 4 purposes:

  1. change current working directory to project's root directory.
  2. detect indentation of Document (Source Code) and set indentation related config according to detected indentation
  3. load config defined in project's root directory
  4. set options according to Language's Standard Style Guide (not implemented yet...)

Getting Started

Install PenVim using your favorite package manager.

Prerequisites

  • neovim >= 0.7

Installation

using vim-plug

Plug'Abstract-IDE/penvim'

or using packer.nvim

use {'Abstract-IDE/penvim'}

Setup

require("penvim").setup() -- use defaults

Full Configuration

require("penvim").setup({
rooter= {
enable=true, -- enable/disable rooterpatterns= {'.__nvim__.lua', '.git', 'node_modules'}
},
indentor= {
enable=true, -- enable/disable indentorindent_length=4, -- tab indent widthaccuracy=5, -- positive integer. higher the number, the more accurate result (but affects the startup time)disable_types= {
'help','dashboard','dashpreview','NvimTree','vista','sagahover', 'terminal',
},
},
project_env= {
enable=true, -- enable/disable project_envconfig_name='.__nvim__.lua' -- config file name
},
})

Examples :

sample, config defined in project's root directory
-- .__nvim__.luareturn {
-- for all file typesall= {
tabstop=4, -- spaces per tabcursorline=true, -- highlight current linerelativenumber=true, -- show relative line numbernumber=true, -- show line numbers
},
-- for filetype lualua= { smarttab=true, -- <tab>/<BS> indent/dedent in leading whitespacesofttabstop=4,
shiftwidth=4, -- spaces per tab (when shifting), when using the >> or << commands, shift lines by 4 spaces
},
-- for filetype python and javascriptpy_js= {
tabstop=4, -- spaces per tabwrap=false, -- don't automatically wrap on load
}
}

To-Do

  • testing
  • implement to set option according to Language's Standard Style Guide
  • optimize code

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

About

Project's root directory and documents Indentation detector with project based config loader

Topics

Resources

Stars

51 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages