• Stars
    star
    286
  • Rank 144,690 (Top 3 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

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

Repository Details

a modern structure neovim config template write in lua

dope

Stargazers Issues Contributors

What is dope

Many people are interested in my personal configuration. So I created dope.

What does dope do? dope wants vimers to have their own config with high performance

fast speed and modernity.

Structure

โ”œโ”€โ”€ init.lua
โ”œโ”€โ”€ lua
โ”‚ย ย  โ”œโ”€โ”€ core
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cli.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ helper.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ init.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ keymap.lua
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ options.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ pack.lua
โ”‚ย ย  โ”œโ”€โ”€ keymap
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ config.lua
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ init.lua
โ”‚ย ย  โ””โ”€โ”€ modules
โ”‚ย ย      โ”œโ”€โ”€ completion
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ config.lua
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ package.lua
โ”‚ย ย      โ”œโ”€โ”€ editor
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ config.lua
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ package.lua
โ”‚ย ย      โ”œโ”€โ”€ tools
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ config.lua
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ package.lua
โ”‚ย ย      โ””โ”€โ”€ ui
โ”‚ย ย          โ”œโ”€โ”€ config.lua
โ”‚ย ย          โ””โ”€โ”€ package.lua
โ”œโ”€โ”€ snippets
โ”‚ย ย  โ”œโ”€โ”€ lua.json
โ”‚ย ย  โ”œโ”€โ”€ lua.lua
โ”‚ย ย  โ””โ”€โ”€ package.json
  • core heart of dope it include the api of dope
  • modlues plugin module and config in this folder
  • snippets vscode snippets json file

Usage

  • Click button Use this template It will generate a new repo based on dope on your GitHub

Cli tool

bin/dope is a cli tool for dope config. run ./bin/dope help check more detail

you can use /bin/dope debug ui,editor for debug modues. when you get trouble this is useful for your debug, this command mean disable ui editor modules.Then the plugins in ui,editor modules not load.

How to install plugins

dope use lazy.nvim as package management plugin. register a plugin in package.lua by using dope api require('core.pack').package. more usage check the lazy.nvim doc and you can some examples in package.lua file.

How to create module

create a fold inside modlues folder and package.lua file you must created inside your module. dope will auto read this file at startup.

How to config keymap

In dope there are some apis that make it easy to set keymap. All apis are defined in core/keymap.lua.

keymap.(n/i/c/v/x/t)map -- function to generate keymap by vim.keymap.set
keymap.new_opts -- generate opts into vim.keymap.set
-- function type that work with keymap.new_opts
keymap.silent keymap.noremap keymap.expr keymap.nowait keymap.remap
keymap.cmd -- just return string with <Cmd> and <CR>
keymap.cu -- work like cmd but for visual map

Use these apis to config your keymap in keymap folder. In this folder keymap/init.lua is necessary but if you

have many vim mode remap you can config them in keymap/other-file.lua in dope is config.lua just an

example file. Then config plugins keymap in keymap/init.lua. the example of api usage

-- generate keymap in noremal mode
nmap {
  -- packer
  {'<Leader>pu',cmd('Lazy update'),opts(noremap,silent,'Lazy update')},
   {"<C-h>",'<C-w>h',opts(noremap)},
  
}

also you can pass a table not include sub table to `map` like

```lua
nmap {'key','rhs',opts(noremap,silent)}

use :h vim.keymap.set to know more about.

Tips

  • Improve key repeat
mac os need restart
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10

linux
xset r rate 210 40

Donate

If you'd like to support my work financially, buy me a drink through paypal

License MIT

More Repositories

1

lspsaga.nvim

neovim lsp plugin
Lua
2,484
star
2

dashboard-nvim

vim dashboard
Lua
1,337
star
3

nvim-lua-guide-zh

https://github.com/nanotee/nvim-lua-guide chinese version
1,186
star
4

galaxyline.nvim

neovim statusline plugin written in lua
Lua
807
star
5

nvim

neovim configuration written in lua
Lua
732
star
6

spaceline.vim

vim statusline like spacemacs
Vim Script
279
star
7

zephyr-nvim

A dark neovim colorscheme written in lua
Lua
272
star
8

oceanic-material

Oceanic Material Colorscheme on Vim/NeoVim
Vim Script
174
star
9

indent-guides.nvim

Lua
149
star
10

GoDoc-CN

Goๆ ‡ๅ‡†ๅบ“็š„ไธญๆ–‡็‰ˆDashๆ–‡ๆกฃ
HTML
133
star
11

jarvim

Generate a module vim configruation like a VIM PRO
Go
112
star
12

leaseapp

goๅผ€ๅ‘็š„ๅŽๅฐAPI
Go
103
star
13

template.nvim

Quickly insert templates into file
Lua
90
star
14

coman.nvim

neovim plugin for comment and annotation
Lua
57
star
15

prodoc.nvim

a neovim comment and annotation plugin using coroutine
Lua
48
star
16

mcc.nvim

neovim macgic char
Lua
35
star
17

DailyTasks

๐ŸŒผ A simple go web app without framework
Go
30
star
18

dotfiles

my personal dotfiles on mac or arch
Shell
26
star
19

golang-advance

Go ๆ•ฐๆฎ็ป“ๆž„ไธŽ็ฎ—ๆณ• ่ฎพ่ฎกๆจกๅผ
Go
23
star
20

mutchar.nvim

a neovim plugin that change type character to other characters accroding rules and filter.
Lua
19
star
21

smartinput.nvim

Lua
15
star
22

hlsearch.nvim

auto remove search highlight and rehighlight when using n or N
Lua
14
star
23

porcelain.nvim

personal colorscheme
Lua
13
star
24

lspmeta.nvim

Go
11
star
25

whiskyline.nvim

whisky line a neovim statusline using coroutine and cache just for fun.
Lua
10
star
26

nerdicons.nvim

get the nerdfont icons inside neovim
Lua
8
star
27

dashboard-imageview

work for dashboard-nvim
Rust
8
star
28

dbsession.nvim

a simple small powerful session for neovim
Lua
8
star
29

go-react-jwt

Golang with React Jwt.
TypeScript
6
star
30

ziglearn-cn

zig programming language tutorial
Zig
6
star
31

glepnir.github.io

Personal Blog
HTML
4
star
32

glepnir

4
star
33

watchdog

Go
3
star
34

fuckcd

2
star
35

GoDDDExample

golang in ddd example
Go
2
star
36

umijs3-crud-example

antd umijs3 crud example
TypeScript
1
star
37

hugo-xshell

HTML
1
star
38

snowflake

Twitter snowflake by go
Go
1
star
39

zapecho

zap logger for echo web framework
Go
1
star