Code Monkey home page Code Monkey logo

nvim-config's Introduction

My personal modern NeoVim config

Autocomplete

Git diff


Doc preview

Glance


Floating terminal


Telescope search


Note for users

You're supposed to fork this repo and work from there (as oppose to cloning it and keep fetching updates by git pulling). This is just a place I share my configs in, not a neovim distribution (like LazyVim or NvChad). I make breaking changes unannounced and if I screw you up welp I told you so.

Setup

  1. Use the latest version of NVIM
  2. Clone this repo into ~/.config/nvim:
git clone https://github.com/leslie255/nvim-config.git ~/.config/nvim
  1. Set up LSP

This setup uses nvim-lspconfig which contains config for most languages servers out there. See lua/configs/autocomplete.lua, edit the list of LSP's in this file to languages you need, and make sure those LSP's are installed globally.

  1. Set up treesitter

Config for treesitter is in lua/configs/treesitter.lua, edit the list of languages in this file and run :TSUpdate.

  1. Set up snippets

Snippet files are in snippets/ (outside the lua/ folder!), this setup uses LuaSnip for snippets.

This setup configrued LuaSnip to use snipmate-like snippet syntax, but LuaSnip also supports VSCode-like JSON snippet syntax, to change it, change "luasnip.loaders.from_snipmate" to "luasnip.loaders.from_vscode" in lua/configs/autocomplete.lua, for more information see related LuaSnip docs.

FAQ

Why does the theme not match the screenshots?

I switch between a few themes sometimes during my usage just to fresh things up a bit, the screenshots are quite old and might not reflect the latest theme, you can change the theme at lua/core/theme.lua. You can also switch between light and dark mode using the keymap <leader>vd (dark) and <leader>vl (light).

Why are there a bunch of question marks?

They are supposed to be the fancy file and arrow icons, to use these icons you need Nerd Fonts, a special kind of font that supports these icons.

Why does it have a bunch of error messages?

First check if you have followed the setup instructions.

If you have and error messages still exist, that's because I've been lazy and couldn't keep up with the latest breaking changes in plugins or neovim.

Contributing

Having troubles

Report an issue If you have issues (don't DM me on social media, report an issue here).

Adding more things

You don't, this isn't a neovim distribution, so fork it and make changes from there.

nvim-config's People

Contributors

leslie255 avatar p-z-l 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

nvim-config's Issues

安装有点问题

我按照教程一步步来,也安装了packer,执行nvim后出现这个界面,跑:PackerInstall这个命令也跑不了,请问是怎么回事呢

image

Not an editor command: PackerInstall

When entering nvim, it first showed below error:

Error detected while processing /root/.config/nvim/init.vim:
line    1:
E5108: Error executing lua vim/keymap.lua:0: rhs: expected string|function, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        vim/keymap.lua: in function 'set'
        /root/.config/nvim/lua/core/keymaps.lua:65: in main chunk
        [C]: in function 'require'
        /root/.config/nvim/lua/core/init.lua:24: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

Then I entered :PackerInstall, it showed Not an editor command: PackerInstall
Your nvim configuration is very good. I am a novice to nvim, Thank you for any help!

About indicator icon of bufferline

I think you should write like this in lua/config/bufferline.lua:

indicator = {
    icon = '▎',
    style = 'icon'
}

instead of

indicator_icon = '▎'

ERROR: current_line_blame_formatter: expe cted function, got string

Error detected while processing /home/zhou/.config/nvim/init.vim:
line    1:
E5108: Error executing lua ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed wit
h this message: .../pack/packer/start/gitsigns.nvim/lua/gitsigns/config.lua:660: current_line_blame_formatter: expe
cted function, got string
stack traceback:
        [C]: in function 'error'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: in function 'callback_or_next'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:40: in function 'step'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:43: in function 'execute'
        ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:113: in function 'setup'
        /home/zhou/.config/nvim/lua/configs/git.lua:3: in function 'config'
        /home/zhou/.config/nvim/lua/core/init.lua:50: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

对vim配置还不太熟,遇到了这个错误。请大佬帮忙看一下该怎么改

Mac启动报错

第    1 行:
E5108: Error executing lua ...site/pack/packer/start/lspsaga.nvim/lua/lspsaga/init.lua:92: [LspSaga] Key show_diagnostic_source not exist in config values
stack traceback:
        [C]: in function 'error'
        ...site/pack/packer/start/lspsaga.nvim/lua/lspsaga/init.lua:92: in function 'extend_config'
        ...site/pack/packer/start/lspsaga.nvim/lua/lspsaga/init.lua:106: in function 'init_lsp_saga'
        /Users/viming/.config/nvim/lua/configs/autocomplete.lua:137: in function 'config'
        /Users/viming/.config/nvim/lua/core/init.lua:56: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
请按 ENTER 或其它命令继续

关于lspconfig与具体的language server绑定

大佬你好!我想问个问题:如果具体的language server是我自己通过源码安装的(比如C语言的ccls),我发现lsconfig是没办法找到这个language server的,所以他会报错说Spawning language server with cmd: ccls failed. The language server is either not installed, missing from PATH, or not executable.。我想问下有没有什么方法可以让lspconfig识别到我自己通过源码安装的language server? 我知道其中一种方法是通过export PATH来解决,但是这个方法太dirty了,有没有可以直接在lsconfig里面改的

图标显示为问号

进入主界面之后, New File 左边的图片没有正常显示, 是不是要进行什么设置呢?
使用的环境是 macOS + zsh

感谢你的配置,这里有一个关于lsp的报错

楼主你好,我仔细阅读了你编写的 README ,也阅读了文档中的相关资料。但是水平有限,一直未能解决这个报错:

line    1:
E5108: Error executing lua /Users/zen/.config/nvim/lua/configs/autocomplete.lua:117: attempt to call field 'init_lsp_saga' (
a nil value)
stack traceback:
        /Users/zen/.config/nvim/lua/configs/autocomplete.lua:117: in function 'config'
        /Users/zen/.config/nvim/lua/core/init.lua:66: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

我使用的系统是:macOS ,能否帮忙看一下?

issue提交 关于其使用的问题

使用nvim命令后

Error detected while processing /home/用户名称/.config/nvim/init.vim:
line    1:
E5108: Error executing lua vim/keymap.lua:0: rhs: expected string|function, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        vim/keymap.lua: in function 'set'
        /home/用户名称/.config/nvim/lua/core/keymaps.lua:67: in main chunk
        [C]: in function 'require'
        /home/用户名称/.config/nvim/lua/core/init.lua:80: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

纯萌新,使用Ubuntu2210,使用的是从官方Release仓库中下载的nvim.appimage改名为nvim后mv到/usr/local/bin的nvim,版本为v0.9.1

启动就报错

处理 /Users/gaoXXX/.config/nvim/init.vim 时发生错误:
第 1 行:
E5108: Error executing lua /Users/gaoXXX/.config/nvim/lua/core/plugins.lua
:2: Vim(packadd):E919: Directory not found in 'packpath': "pack/*/opt/packer
.nvim"
stack traceback:
[C]: in function 'cmd'
/Users/gaoXXXX/.config/nvim/lua/core/plugins.lua:2: in main chunk
[C]: in function 'require'
/Users/gaoXXXX/.config/nvim/lua/core/init.lua:25: in main chunk
[C]: in function 'require'
[string ":lua"]:1: in main chunk

仓库变啦

readme文件里边,setup第1步,克隆仓库的地址还是之前那个

Theme not matching - newbie here

First of all I want to say a sincere thank you for sharing your config and doing all this work with your instructions. I am a beginner to the vim world and they helped me a lot.

I have nvim and neovide installed. When I open nvim, it shows a white theme and I see some question marks in squares which I think is not normal. I feel like I am missing something unless this looks normal to you. I'd appreciate your help.

Thank you
Screen Shot 2022-10-05 at 10 28 35 PM

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.