• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    Lua
  • License
    BSD 3-Clause "New...
  • Created about 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

All-in-one neovim config framework in Lua.

One.nvim

All-in-one neovim configuration framework implemented with Lua. It is highly flexible to be customized and extended.

English | 中文

Features

Screenshots

Click to expend/collapse

Dashboard

dashboard.png

UI

UI.png

UI-2.png

Outline

outline.png

Press <space>o to open the outline.

File Finder

finder.png

Press <space>f to open the file finder.

Keymaps

keymaps.png

Press <space>k to open the keymap finder.

Command Finder

cmd-finder.png

Press <space>p to open the keymap finder.

Diagnostic

diagnostic.png

Press <space>d or <space>D to open the diagnostic list. See Diagnostic keymaps.

Completion

completion.png

Function signature completion

completion-function-args.png

Installation

Update

The source codes of one.nvim is not managed by plugin manager.

You can update them by lua functions or commands.

  • Update one.nvim: :OneUpdate one or :lua one.update('one')
  • Update pm: :OneUpdate pm or :lua one.update('pm')
  • Update all (one.nvim + pm): :OneUpdate or :OneUpdate all or :lua one.update()

FAQ

Configuration

require('one').setup {}

All config options are optional. You can override default configs. Please read User Config.

Plugin Manager

Note: One.nvim will install plugin manager on start up. So user should not install one.nvim via plugin manager.

Choose your favorite plugin manager. Now available: lazy (default), vim-plug, packer, local.

require('one').setup {
  config = {
    pluginManager = { use = 'lazy' }, -- 'lazy' or 'vim-plug' or 'packer' or 'local'
  },
}
lazy vim-plug packer
Plugins Directory {DATA_DIR}/plugins {DATA_DIR}/plugins {DATA_DIR}/site/pack/user/start/packer.nvim
Default Config lua/one/config/lazy.lua lua/one/config/vim-plug.lua lua/one/config/packer.lua

The value of {DATA_DIR} is :lua print(vim.fn.stdpath('data')).

When you change to packer from lazy or vim-plug, the plugins should be reinstalled. Read initialization for details.

When config.pluginManager.use = 'local', this plugin manager can only load local plugins. It cannnot install packages from remote.

Plugin

All plugins can be turned off, overridden default config options, replaced with your favorites. It is highly flexible to be customized and extended.

Read ./doc/plugin.md for plugin definitions and references.

You can even set onlyPlugins = {} to disable all plugins. Read Debug - Disable other plugins.

You can invoke :OneShowPlugins to view disabled and enabled plugins.

Colors and Highlights

It's highly dependent on treesitter. If syntax highlights not work, check your treesitter parsers correct. Read ./doc/treesitter.md for troubleshooting.

You can override the default colors and highlights. Read ./doc/colors.md for more details.

Color Space

The colors are desiged based on Display P3 color space. It works for MacOS and iTerm2 users.

If your nvim colors looks different from below picture. Your terminal is not under Display P3 color space. You may try sRGB colors. Read Colors - Color Space for details.

Notice

$VIMRUNTIME/filetype.vim won't be loaded. Filetype detected in ./lua/one/plugins/filetype.lua。

Read ./doc/note.md for other notes.

Usage

API

Just read codes.

Project File Structure

.
├── doc/                     // Documents
├── lua/
│   └── one/
│       ├── async.lua        // async library
│       ├── config/          // Keymaps
│       │   ├── colors.lua   // Default color config
│       │   ├── default.lua  // Default config
│       │   ├── packer.lua   // packer.nvim default config
│       │   ├── symbol.lua   // symbols
│       │   └── vim-plug.lua // vim-plug default config
│       ├── config.lua       // Config loader
│       ├── consts.lua       // Constants
│       ├── filetype.lua     // FileType autocmd
│       ├── one.lua          // The one singleton
│       ├── init.lua         // The lua required entry point
│       ├── plugins.lua      // Plugin loading list
│       ├── util.lua         // Utility functions
│       ├── util_spec.lua    // Unit test for util.lua
│       ├── keymap/          // Keymaps
│       ├── plugins/         // Available plugins written in lua
│       │   └── themes/      // Color schemas
│       └── plugin-manager/
│           ├── init.lua     // Plugin Manager
│           ├── lazy.lua     // Wrapper for lazy.nvim
│           ├── local.lua    // Only load local files
│           ├── vim-plug.lua // Wrapper for vim-plug
│           └── packer.lua   // Wrapper for packer.nvim
└── scripts/                 // scripts for building project

Startup Time

require('one').setup {
  plugins = {
    { 'profiling', disable = false }, -- This plugin is disabled in default
  }
}

Enable profiling plugin, and invoke :StartupTime in nvim. It will print each time on startup.

Suggestion, Bug Reporting, Contributing

Before opening new Issue/Discussion/PR and posting any comments, please read ./CONTRIBUTING.md.

Copyright and License

Copyright 2016-2023 ADoyle ([email protected]). Some Rights Reserved. The project is licensed under the BSD 3-clause License.

Read the LICENSE file for the specific language governing permissions and limitations under the License.

Read the NOTICE file distributed with this work for additional information regarding copyright ownership.

Other Projects

Other nvim projects created by me.

More Repositories

1

lobash

A modern, safe, powerful utility/library for Bash script development.
Shell
367
star
2

my-development-tools

ADoyle įš„åŧ€å‘åˇĨå…ˇįŽą
SCSS
356
star
3

Today-I-Learned

åšč§‚č€ŒįēĻ取īŧŒåŽšį§¯č€Œč–„发。
JavaScript
95
star
4

lsp-toggle.nvim

Disable/Enable LSP clients and NullLS sources for buffers.
Lua
36
star
5

dotfiles

My dotfiles based on one.bash for personal usage.
Shell
30
star
6

blog

My Blog
Makefile
16
star
7

telescope-extension-maker.nvim

Easy to make a telescope extension
Lua
14
star
8

bash-completor

Creating a bash completion script in a declarative way.
Shell
12
star
9

shell-general-colors

A script to generate sets of shell variables (ANSI escape sequences) to control text color, boldness, underlining, blinking and other effects.
Shell
12
star
10

bash-logger

A simple bash logger utility
Shell
11
star
11

ad-telescope-extensions.nvim

A set of telescope extensions
Lua
8
star
12

Ero.js

A library provides simple functions for building your own customized errors.
JavaScript
7
star
13

a-bash-prompt

A Bash prompt written by pure Bash script. Make Bash great again!
Shell
6
star
14

makefile-utils

A series of makefile targets for enhancing your Makefile.
Makefile
5
star
15

my-command-cheat

A cheat sheet for linux commands (Simplified Chinese)
4
star
16

nodejs-project-snippets

some code snippets for building a robust javascript project
JavaScript
3
star
17

watermark

A bash command to make watermarks on image.
Shell
3
star
18

neovim-config

My personal neovim configuration
Lua
3
star
19

clash-in-container

compose.yaml for clash-meta, clash-dashboard, subconverter.
Dockerfile
3
star
20

logic-string

Calculate logical expressions in string.
JavaScript
2
star
21

docker-flyway

A docker image for flyway command-line tool.
Shell
2
star
22

iThoughts-Search

A bash command for searching content from multi iThoughts (.itmz) files
Shell
2
star
23

design-grid-system

This is a tool to preview grid system for design.
JavaScript
1
star
24

What-I-Read

Record awesome articles and books which I have read. Ipsa Scientia Potestas Est.
1
star
25

winston-pretty-console

A winston transport based on sprintf-js, cli-color, pretty-error for pretty console output
JavaScript
1
star
26

jekyll-autolinks

Automatically create <a> DOMs from standard URLs for your Jekyll site.
Ruby
1
star
27

react-request-container

A simple React higher-order component for request.
JavaScript
1
star