Code Monkey home page Code Monkey logo

nvimdots's Introduction

nvimdots
NeoVim Version Capability Release

Stars Issues Contributors Code Size

🪷 Introduction

This repo hosts our NeoVim configuration for Linux (with NixOS support), macOS, and Windows. init.lua is the config entry point.

Branch info:

Branch Supported neovim version
main nvim 0.9 stable
0.10 nvim 0.10 nightly
0.8 nvim 0.8
0.7 nvim 0.7

Important

The 0.10 branch is intended for nightly neovim builds and is not stable. It typically harbors subtle issues scattered throughout. Therefore, refrain from submitting issues if you happen to encounter them. They will be closed directly unless a viable solution is proposed or included.

We currently manage plugins using lazy.nvim.

Chinese introduction is here.

🎐 Features

  • Fast. Less than 30ms to start (Depends on SSD and CPU, tested on Zephyrus G14 2022 version).
  • Simple. Run out of the box.
  • Modern. Pure lua config.
  • Modular. Easy to customize.
  • Powerful. Full functionality to code.

🏗 How to Install

Just run the following interactive bootstrap command, and you're good to go 👍

  • Windows (Note: This script REQUIRES pwsh > v7.1)
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.ps1'))
  • *nix
if command -v curl >/dev/null 2>&1; then
    bash -c "$(curl -fsSL https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
else
    bash -c "$(wget -O- https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
fi

It's strongly recommended to read Wiki: Prerequisites before starting, especially for *nix users.

⚙️ Configuration & Usage

🗺️ Keybindings

See Wiki: Keybindings for details


🔌 Plugins & Deps

See Wiki: Plugins for details
(You can also find a deps diagram there!)


🔧 Usage & Customization

See Wiki: Usage for details


❄️ NixOS Support

See Wiki: NixOS Support for details


🤔 FAQ

See Wiki: FAQ for details

✨ Features

⏱️ Startup Time

StartupTime

Vim-StartupTime

Tested with rhysd/vim-startuptime

📸 Screenshots

Dashboard Dashboard


Telescope Telescope


Coding Coding


Code Action Code Action


Debugging Debugging


Lazygit Lazygit with built-in Terminal


Command quickref Command quickref

👐 Contributing

  • If you find anything that needs improving, do not hesitate to point it out or create a PR.
  • If you come across an issue, you can first use :checkhealth command provided by nvim to trouble-shoot yourself.
    • If you still have such problems, feel free to open a new issue!

❤️ Thanks to

🎉 Acknowledgement

📜 License

This NeoVim configuration is released under the MIT license, which grants the following permissions:

  • Commercial use
  • Distribution
  • Modification
  • Private use

For more convoluted language, see the LICENSE.

nvimdots's People

Contributors

aarnphm avatar angelontheroad avatar ayamir avatar charleschiugit avatar cherrot avatar clslaid avatar clzoc avatar codychau avatar csyjoy avatar cyberczy avatar fecet avatar feng2r200 avatar fioncat avatar github-actions[bot] avatar groveer avatar hatter-long avatar jczhang02 avatar jint-lzxy avatar justforlxz avatar kang8 avatar lehmaning avatar lraxer avatar mathjiajia avatar misumisumi avatar mjkx5 avatar returns-1 avatar saafo avatar younger-1 avatar yucao16 avatar zll600 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvimdots's Issues

Hi,i refer to friendly snippet,but somewhere is not friendly, I don't know if i'd wrong

截屏2021-09-03 下午8 39 04
as you see , i add snippet in friendly snippet file
and i complie packer.
it's ok for everything
but some is not ok
截屏2021-09-03 下午8 40 46
that you see i can tab to complete my snippet.but i can not preview.
i read more about friendly snippet , no different from me.
but their can preview ,only my snippet
i can complete my snippet just not preview
It's not friendly for me
could you help me?
thanks

how to use the commands to switch light/dark theme?

I saw these commands, but I don't know how to use it. Should I just type them in terminal or add them in a config file?
Thanks

To light

sed -i "s/\=dark/\=light/g" ~/.config/nvim/lua/modules/ui/config.lua
sed -i "s/onedark/onelight/g" ~/.config/nvim/lua/modules/ui/config.lua

To Dark

sed -i "s/\=light/\=dark/g" ~/.config/nvim/lua/modules/ui/config.lua
sed -i "s/onelight/onedark/g" ~/.config/nvim/lua/modules/ui/config.lua

E5108: Error executing lua & E114: 缺少引号 & no such file or directory

Describe the bug

when you open some files, it will reveal some error messages like following.

处理 BufReadPost 自动命令 "*" 时发生错误:
E5108: Error executing lua ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: Vim(echomsg):E114: 缺少引号: "Error in packer_compiled: ...vim/site/pack/p
acker/opt/packer.nvim/lua/packer/load.lua:155: Vim(lua):E5108: Error executing lua ...im/HEAD-2ef9d2a_1/share/nvim/runtime/lua/vim/lsp/rpc.lua:328: start `efm-langser
ver` failed: ENOENT: no such file or directory
stack traceback:
        [C]: in function 'cmd'
        ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: in function <...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:161>
        [string ":lua"]:1: in main chunk

To Reproduce
Opening any file in my PC will see this error, and the message will disappear after .

Screenshots
image

Environment (please complete the following information):

  • OS: macOS
  • Nvim version(output of nvim --version)

NVIM v0.6.0-dev+575-g2ef9d2a66
Build type: Release
LuaJIT 2.1.0-beta3
Features: +acl +iconv +tui

为什么去除了 lspsaga 插件?

请问下为什么要去除 lspsaga 插件?

虽然最近 nvim0.6 有些不兼容,但还是可以使用 0.5的分支,还是说有什么其他原因吗?

感谢分享的这份配置,非常好用 :)

因为插件本身的变动导致需要修改配置

andersevenrud\compe_tmux的作者在几天前将主分支切换为cmp_tmux,而compe_tmux变为可选分支,导致PackerSync无法更新这一插件,因此需要将lua/modules/completion/plugins.lua文件中的第28行由{"andersevenrud/compe-tmux", branch = "cmp", after = "cmp-nvim-lua"},修改为{"andersevenrud/cmp-tmux", after = "cmp-nvim-lua"}

how to add below config into your config

autocmd FileType tex lua require('cmp').setup.buffer {
\   snippet = {
\     expand = function() ... ultisnipet setup ... end,
\   },
\   sources = {
\     { name = 'ultisnips' }
\ }
\ }

hi, i can feel that's become better and better,but i have a problem in nvim-comment plugin,cloud you help me

i write vue,but the nvim-comment cannot work good,
i find that plugin always use javascript's comment method, but vue somewhere should use html's comment
I find a plugin can fix that and it can use nvim-comment as base comment,it maybe use treesitter to comment
I read more about readme but not work
I know need modify nvim-comment, treesitter config ,add editor plugin to do it
I'm sad for that it not work and feel sorry that worry you
if you have some time, cloud you help me?
https://github.com/JoosepAlviste/nvim-ts-context-commentstring

Vim:E492: Not an editor command: NvimTreeToggle

执行完PackerSync后,打开NvimTree就出现了下面的错误。
Error in packer_compiled: ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:82: Vim:E492: Not an editor command: NvimTreeToggle

网上找了很久,貌似这个是Packer的一个Bug,状态是已经解决,但是又出现了
https://github.com/wbthomason/packer.nvim/pull/449
在nvim-tree配置中增加了下面的内容可以解决这个问题,
require('nvim-tree').setup{}
但是首次打开时会有下面的提示
[NvimTree] following options are now set in the setup, please read the new documentation for the setup function: nvim_tree_disable_netrw | nvim_tree_hijack_netrw | nv im_tree_auto_open | nvim_tree_auto_close | nvim_tree_tab_open | nvim_tree_follow | nvim_tree_lsp_diagnostics | nvim_tree_bindings | nvim_tree_disable_keybindings
请教下这个怎么去配置关闭提示呢?还有就是不希望打开文件后,根目录自动切换,这个是需要怎么配置呢,谢谢

How to add a custom plugin

Thanks for creating this great Neovim Lua configuration!

Just wondering how to add a custom plugin.

I have followed the instruction to add code in

  • module/tools/config.lua
  • module/tools/plugin.lua

but not succeed.

In my case, I want to add this plugin: jalvesaq/Nvim-R

Below are the added parts:

> tail module/tools/config.lua

...

function config.NvimR()
    require("Nvim-R").setup({})
end

return config
> tail module/tools/plugin.lua

...

tools["jalvesaq/Nvim-R.nvim"] = {opt = true}

return tools

修改dashboard的executive无效

环境: WSL2
问题日志 输入,ff提示Not an editor command: Clap files ++finder=rg --ignore --hidden --files
image
个人尝试 删除掉 .local/share/nvim.config/nvim 的文件夹重试了好几次都是这样的问题, 最小化配置的dashboard-nvim插件是可以正常切换为telescope的. 可以请教下哪里可能有问题么?

configuration change for sqlite.lua to work on windows system

Describe the bug
On windows system, sqlite.lua failed to load because of lack of sqlite3.dll. To solve this problem, one can change the line locate in lua/modules/tools/config.lua:
vim.cmd [[packadd sqlite.lua]]
to:
vim.cmd [[
let g:sqlite_clib_path = 'path/to/sqlite3.dll' (NOTE: Users need to download precompiled sqlite from https://www.sqlite.org/download.html)
packadd sqlite.lua
]]

bind_option函数bug?

这个设置 buffer local 变量的函数对于 false 的处理是有bug吧?

local function bind_option(options)
for k, v in pairs(options) do
if v == true or v == false then
vim.cmd('set ' .. k)
else
vim.cmd('set ' .. k .. '=' .. v)
end
end
end

how to add the two shortcuts config in nvim config

inoremap <C-f> <Esc>: silent exec '.!inkscape-figures create "'.getline('.').'" "'.b:vimtex.root.'/figures/"'<CR><CR>:w<CR>
nnoremap <C-f> : silent exec '!inkscape-figures edit "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>

Hope give me a config , i am just a noob of lua nvim

nvim启动报错

克隆配置到~/.config然后启动nvim,提示如下错误:

处理 /home//.config/nvim/init.lua 时发生错误:
E5113: Error while calling lua chunk: vim/_meta.lua:180: E474: Invalid argument
stack traceback:
[C]: in function 'nvim_buf_set_option'
vim/_meta.lua:180: in function '__newindex'
/home/
/.config/nvim/lua/core/options.lua:129: in function 'load_options'
/home/
/.config/nvim/lua/core/options.lua:133: in main chunk
[C]: in function 'require'
/home/
/.config/nvim/lua/core/init.lua:152: in function 'load_core'
/home/
/.config/nvim/lua/core/init.lua:161: in main chunk
[C]: in function 'require'
/home/
*/.config/nvim/init.lua:1: in main chunk

按任意键以后可以进入nvim,无法用PackerInstall安装插件
这个是什么原因造成的?nvim是编译安装的,系统没有安装vim

提高国人插件下载速度(Feature)

packer.init({
    compile_path = packer_compiled,
    disable_commands = true,
    display = {
        open_fn = function()
            return require("packer.util").float({border = "single"})
        end
    },
   git = {
   clone_timeout = 120,
   default_url_format = 'https://hub.fastgit.org/%s'
  }
})

把core/pack.lua 里面这个改下下载插件飞起来

为什么切换不了 白色主题

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. 按照 readme 上面 的 `Switch light/dark theme(if you use edge theme)

To light

sed -i "s/\=dark/\=light/g" ~/.config/nvim/lua/modules/ui/config.lua
sed -i "s/onedark/onelight/g" ~/.config/nvim/lua/modules/ui/config.lua`

然后退出重启 ,还是黑色的主题 ,我试着把 nvim 删除 了,重新克隆 安装 一边, 在按照文档上面做,但是结果还是一样的……

E492: 不是编辑器的命令: NvimTreeToggle,以及安装插件问题

Describe the bug
Macos安装后出现如下问题
调用NvimTreeToggle报错
截屏2021-12-05 下午3 13 29

此外,有几个插件总是安装不上,环境有代理,重复调用PackerSync也无效,并且显示安装不上的插件还不一样
截屏2021-12-05 下午3 14 06

截屏2021-12-05 下午3 19 33

To Reproduce
Neovim使用brew进行安装,版本是6.0
安装流程完全按照readme中说明,并且按照如下命令重新安装后也无效:
rm -fr ~/.local/share/nvim
rm -fr ~/.config/nvim
git clone https://github.com/ayamir/nvimdots ~/.config/nvim

Environment (please complete the following information):

  • OS: Macos
  • Nvim version(output of nvim --version)
    NVIM v0.6.0
    Build type: Release
    LuaJIT 2.1.0-beta3
    编译者 [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

 系统 vimrc 文件: "$VIM/sysinit.vim"
     $VIM 预设值: "/opt/homebrew/Cellar/neovim/0.6.0/share/nvim"

lua版 clangd补全头文件时,补全了多余的‘>’符号

我知道用enter键可以解决这个问题,但是处在插入状态,会有报错信息,返回norml状态才正常。
所以有无可能去除多余的'>'符号,tab键选中之后,直接esc,就能正确补全?我用coc补全的时候这样是可以的。
2021-11-04_00-18

How to add custom LuaSnip?

Again, I am new to Lua configuration, one more simple question.

I want to add more custom snippets, perhaps via LuaSnip.

should I add snippets in module/completion/plugin.lua as shown below:

completion["L3MON4D3/LuaSnip"] = {
    after = "nvim-cmp",
    config = conf.luasnip,
    requires = "rafamadriz/friendly-snippets"
}

or should I create a special folder such as nvim/snippets/, then write json snippets, like this one?

About neovide, goneovimkeymap.config error

I have used PackerSync and it updated some plugins(I don't remember which). Then I reopen the file it comes out this error
DeepinScreenshot_select-area_20210831122520
I have tryed to comment the require('neovide, goneovimkeymap.config'), but after that, all the plugins with the start v.lua in the mapping command were dead (e.g. accelerated jk, vim-eft)
DeepinScreenshot_select-area_20210831122911

I don't use neovide or goneovim to start nvim, instead I use st(simple terminal).

我可以很好的使用这个lua的配置,并且添加自己的东西,可是lsp似乎存在一个问题

我在youtube上看见一个博主的视频,他gd,可以跳入到导入的函数,我和他是用的一个lsp,关于 gd 映射去 definition ,我注意到我的好像不能跳转到导入的函数,只能跳到本文件的函数定义处,我去改了映射和youtuber的映射一样,可似乎还是不能解决,很抱歉给你提出这样的issuse,可现在的我实在找不到办法解决。
截屏2021-08-11 下午1 58 40
这是我gd后似乎没有跳转进文件的截图
截屏2021-08-11 下午1 59 04

缺少ffi模块

packer.nvim: Error running config for nvim-colorizer.lua: ...packer/opt/nvim-
colorizer.lua/lua/colorizer/trie.lua:16: module 'ffi' not found:
^Ino field package.preload['ffi']
^Ino file './ffi.lua'
^Ino file '/usr/local/share/lua/5.1/ffi.lua'
^Ino file '/usr/local/share/lua/5.1/ffi/init.lua'
^Ino file '/usr/local/lib/lua/5.1/ffi.lua'
^Ino file '/usr/local/lib/lua/5.1/ffi/init.lua'
^Ino file '/usr/share/lua/5.1/ffi.lua'
^Ino file '/usr/share/lua/5.1/ffi/init.lua'
^Ino file './ffi.so'
^Ino file '/usr/local/lib/lua/5.1/ffi.so'
^Ino file '/usr/lib/aarch64-linux-gnu/lua/5.1/ffi.so'
^Ino file '/usr/lib/lua/5.1/ffi.so'....

NVIM v0.6.1
Build type: Release
Lua 5.1
Compiled by [email protected]

OS:Linux kali 5.15.0-kali2-arm64 #1 SMP Debian 5.15.5-2kali2 (2021-12-22) aarch64 GNU/Linux

偶而修改配置后会删除全部插件

修改完配置后,会偶现所有插件被删除,出现过两次了,最近一次出现是提示

current_line_blame_delay is deprecated, please use current_line_blame_opts.delay                           
current_line_blame_position is deprecated, please use current_line_blame_opts.virt_text_pos  

然后按照说明修改了配置,保存后所有插件就被删除了

我很喜欢这个一眼明了的配置,可是我在使用中,有个lua文件配置的问题,请帮助我,或者提供一下思路,谢谢大大

我注意到我直接clone下了分支,然后确保了我安装了插件可是,似乎只有在plugin的lua文件的没有生效。
我不知道是我做错了什么吗,我去了galaxyline的官网,按照官网的示例,我将lua的文件设置生效了。但如果每一个都这么做似乎很麻烦,应该是我做错了什么。抱歉浪费你宝贵的时间,希望您能在空闲的时候,帮我看看。
这是直接clone下的coc分支效果图
截屏2021-06-28 下午7 10 26
这是我按照官网配置后,改变了文件目录的配置
截屏2021-06-28 下午7 13 53
我注意到似乎连文件名都不能命名为galaxyline只有命名为官网的evailine才会生效,我已尽可能在找我犯的错误,可是我没有找到,我确信我用的最新版本的neovim

packer_compiled.vim : no such file.

image

Error executing vim.schedule lua callback: ...are/nvim/site/pack/packer/opt/packer.nvim/lua/packer.lua:326: Vim(lua):E5108: Error executing lua /home/jczhang/.config/nvim/lua/core/pack.lua:79: bad argument #1
 to 'lines' (/home/jczhang/.local/share/nvim/site/packer_compiled.vim: No such file or directory)

How to change the indent width of cpp file

Hello, I'm learning vim and the lua configuration. I found that the auto indent width of c and cpp file is 2 while rust and python is 4.

image

I'm using clangd installed by nvim-lsp-installer, so I tried to create .clang-format in my home directory, setting IndentWidth: 4, but it is not working.

It seems like a stupid question but it really confuses me. Could you please help me?

cmp-rg will access invalid memory

cmp-rg will access invalid memory

My Enviroment

image

My NeoVim Config:

github

What did I do:

touch main.py && nvim main.py

What had happened:

the beneath bar will show msg cmp-rg/init.lua 29 in function
image

Make nvim auto indent after enter { and return

while i am coding, i will write a new function, after i enter the '{', and return , nvim appear that:

public static void main(String[] args) {
    ""}

but i want that:

public static void main(String[] args) {
        ""
    }

nvim icon 乱码

请问nvim乱码是什么原因呢?
截屏2021-07-15 下午7 52 37 (2)
还有开始界面的这个warning怎么去掉呀?

coc 配置文件下 vue文件字体高亮和主题颜色冲突

我在coc配置的基础上安装了以下几个包
Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx', 'html', 'vue'] }
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
Plug 'mxw/vim-jsx'
Plug 'leafOfTree/vim-vue-plugin'

然后当我进入vue文件中时,script tag下的所有字符全都是 onehalf主题的statement所定义的purple颜色。
/onehalf/vim/colors/onehalflight.vim
136 行 call s:h("Statement", s:purple, "", "")
image

但是当我选中这些字符的时候,它的颜色就变为了vim-vue-plugin支持的高亮颜色:
image

请问这是和之前的配置文件有冲突吗?

Vim indent line

How did you get your indent line to highlight the start of a code block and end at the end of a code block?

Lua does not get correct HOME path on Windows 11

In lua/core/global.lua:2:

local home = os.getenv("HOME")

On modern Windows (and PowerShell Core 7, I'm not sure about the exact version numbers of Windows/PowerShell that are affected by this issue), the home variable will get a nil value. This will cause the following error:

image

However, we can get the home path by reading HOMEDRIVE HOMEPATH or USERPROFILE, e.g.:

local home = os.getenv("USERPROFILE")  -- this works for me

The corresponding environment variables in PoweShell are
$env:HOMEDRIVE, $env:HOMEPATH and $env:USERPROFILE.

$env:HOME in PowerShell is an empty value by default.

如何使用lspconfig

这个配置很全面,但是目录有点复杂,不知道该在哪里加入自己的配置~
请问如何在lspconfig.lua中写入自己的配置,比如clangd.
另:在lspconfig仓库给出的配置似乎不能直接复制进入lspconfig.lua使用.

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.