Skip to content

Commit

Permalink
🚧 update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LuYanFCP committed Aug 12, 2023
1 parent 7e45f95 commit 0909ba7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 181 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .pre-commit-config.yaml

This file was deleted.

166 changes: 3 additions & 163 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,167 +1,7 @@
<h1 align="center">
<img
src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png"
height="30"
width="0px"
/>
dope
<img
src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png"
height="30"
width="0px"
/>
</h1>
# My Nvim Config

<p align="center">
<a href="https://github.com/glepnir/dope/stargazers">
<img
alt="Stargazers"
src="https://img.shields.io/github/stars/glepnir/dope?style=for-the-badge&logo=starship&color=c678dd&logoColor=d9e0ee&labelColor=282a36"
/>
</a>
<a href="https://github.com/glepnir/dope/issues">
<img
alt="Issues"
src="https://img.shields.io/github/issues/glepnir/dope?style=for-the-badge&logo=gitbook&color=f0c062&logoColor=d9e0ee&labelColor=282a36"
/>
</a>
<a href="https://github.com/glepnir/dope/contributors">
<img
alt="Contributors"
src="https://img.shields.io/github/contributors/glepnir/dope?style=for-the-badge&logo=opensourceinitiative&color=abcf84&logoColor=d9e0ee&labelColor=282a36"
/>
</a>
</p>
## Introduce

<p align="center">
<img src="https://user-images.githubusercontent.com/41671631/176990490-aeb6111b-41ea-4767-bc03-c0aee4774a4e.png"
height = "40%"
width = "40%"
/>
</p>

## What is dope

Many people are interested in my [personal configuration](https://github.com/glepnir/nvim). 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](https://github.com/folk/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`.

```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

```lua
-- 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

[![](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/bobbyhub)

If you'd like to support my work financially, buy me a drink through [paypal](https://paypal.me/bobbyhub)
My personal Nvim Config base on [dope](https://github.com/nvimdev/dope)

## Licenese MIT

0 comments on commit 0909ba7

Please sign in to comment.