Giter VIP home page Giter VIP logo

neovim-from-scratch's Introduction

neovim-from-scratch's People

Contributors

abheetchaudhary avatar abxh avatar alexis12119 avatar andresatierf avatar aniketmishra0 avatar blentz100 avatar brianrobt avatar christianchiarulli avatar dvchoudh avatar fdumontmd avatar gnmearacaun avatar lytex avatar oflisback avatar ostap-tymchenko avatar singularisart avatar snehalyelmati avatar williamboman 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neovim-from-scratch's Issues

HealthCheck gives an error

I tried running :healthcheck but it gave following error

Running healthchecks......
Error detected while processing function health#check:
line 37:
E684: list index out of range: 0

gcc commenting doesn't seem to work

Using the master branch.
I've tried using gcc command on python type of files, but it seems to not do anything.

ts_context_commentstring plugin and the settings should allow it to work. But something seems to be missing.
I am using nvim 0.6 version.

Leader - q not quitting

Pressing leader then q should quit nvim but instead I get a new silce at the bottom:
image

Using Ubuntu with WSL.
Lunarvim is working, and it works if I comment out:

require "user.lsp"

config not working when using sudo

when i use neovim to edit any file that i can edit (config files) the config works, but when i use sudo nvim to edit a file that i can't edit (.desktop) neovim uses the defult config

Taking away all the user. from init.lua causes issues.

Hi Chris!
This project looks and works very well and really eases up setting own stuff.
The lua folder feels bit obsolete and moving files and folder from user folder to higher level causes issues after taking away all the user. statements from init.lua.

Is there a reason for creating and using user folder instead of moving it to higher level??

Some refactorings possible in options + an explanation

Hello! First of all, thanks for the series. It's awesome.

I did some researches to understand why (according to your TODO) format options are not working:

vim.cmd [[set formatoptions-=cro]] -- TODO: this doesn't seem to work

I discovered that neovim internally has a plugin named ftplugin that should stand for "filetype plugin" that dispatches (between the others) the format options for a specific file format. Neovim loads the plugin AFTER your custom configuration, so once you open a file with a recognized extension, the configuration is overridden.

The only documented way that I found to override this behaviour in Neovim (since autocmd FileType * set formatoptions= doesn't work as it does in vim) is described here, and it involves adding parameters to the ftplugin configuration section that is loaded after the plugin, that appears to be language-specific, i.e. for Lua ~/.config/nvim/after/ftplugin/lua.lua
:help runtimepath contains some more information about these files that are executed at runtime. I haven't still figured out how to set these options globally sadly.

Bonus section
This section:

vim.cmd "set whichwrap+=<,>,[,],h,l"
vim.cmd [[set iskeyword+=-]]

can be rewritten in pure lua as

vim.opt.whichwrap:append "<,>,[,],h,l"
vim.opt.iskeyword:append "-"

Lsp handler not happy with multiple tsconfig.json

Hi there! Thanks for putting this together, it has helped immensely 😄

I'm currently working on a rather large project with multiple tsconfigs in the same project (different dirs tho).
I bring this up because the following issue only comes up in this setup. Other ts projects work just fine, so there is a chance it has nothing to do with the config.

That being said, temporarily swapping my config for the one in this repo and opening ts files in the problematic project produces the same outcome. So there's that 🤷

The project is also big. As in 1.5GB (without node_modules) kinda big.

Basically, (after a small delay after opening a file) I get a recurring error:

Error detected while processing CursorHold Autocommands for "<buffer=1>":
method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer

This keeps popping up constantly which prevents me from doing anything.

Trying to run something like :Telescope lsp_code_actions just repeats part of the previous error:

method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer

Might be worth mentioning that I occasionally get the following error:

Client 3 quit with exit code 1 and signal 0

For example, when editing my init.vim (even though there's just vimls and null-ls)

I noticed that removing the line with autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight() (located in the handlers.lua file), gets rid of the first error message, although that still leaves the second one and simply means not having proper highlighting.
So that didn't solve much...

In case it helps, running :LspInfo with a problematic file open shows:

 Language client log: /home/eric/.cache/nvim/lsp.log
 Detected filetype:   typescript
 
 1 client(s) attached to this buffer: 
 
 Client: null-ls (id: 1, pid: 5001, bufnr: [1])
 	filetypes:       lua, javascript, typescript, typescriptreact, javascriptreact, vue, sass, scss, less, css, sh
 	autostart:       false
 	root directory:  /home/eric/Documents/leanmind/audiense/socialbro
 	cmd:             nvim
 
 Other clients that match the filetype: typescript
 
 Config: tsserver
 	filetypes:         javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx
 	root directory:    /home/eric/Documents/leanmind/audiense/socialbro
 	cmd:               typescript-language-server --stdio
 	cmd is executable: true
 	autostart:         true
 	custom handlers:   
 
 Configured servers list: html, ltex, tsserver, yamlls, cssls, sqlls, emmet_ls, vimls, sumneko_lua, dockerls, jsonls

And :checkhealth shows:


bettersml: health#bettersml#check
========================================================================
## REPL
  - OK: REPL backend is available and valid: neovim
  - OK: SML/NJ is executable at '/usr/bin/smlnj'.
  - OK: rlwrap is available and will be used to launch REPLs

## Type information
  - OK: MLton is executable at 'mlton'.
  - OK: Support files are executable at '/home/eric/.config/nvim/plugged/vim-better-sml/bin/vbs-util'.

## General
  - OK: Asynchronous jobs are available.
  - WARNING: def-use files will not be auto-built
    - ADVICE:
      - We did not find an MLBasis file for your project, and you have
      - g:sml_auto_create_def_use = 'mlb'. This means that def-use files
      - will only be auto-built for multi-file projects.
      - See :help |g:sml_auto_create_def_use| for more information.
  - WARNING: Compilation errors will not be reported.
    - ADVICE:
      - To have Vim report SML errors and warnings alongside your code,
      - install one of w0rp/ale or scrooloose/syntastic.
      - Also be sure to have SML/NJ installed.

mkdp: health#mkdp#check
========================================================================
  - INFO: Platform: linux
  - INFO: Nvim Version: NVIM v0.6.1
  - INFO: Node version: v17.3.0

  - INFO: Script: /home/eric/.config/nvim/plugged/markdown-preview.nvim/app/server.js
  - INFO: Script exists: 1
  - OK: Using node

null-ls: require("null-ls.health").check()
========================================================================
  - OK: stylua: the command "stylua" is executable.
  - OK: eslint: the command "eslint" is executable.
  - OK: stylelint: the command "stylelint" is executable.
  - OK: stylelint: the command "stylelint" is executable.
  - OK: shellharden: the command "shellharden" is executable.
  - OK: shellcheck: the command "shellcheck" is executable.

nvim: health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $COLORTERM='truecolor'

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: **Ruby**: not available
  - WARNING: **RubyGem**: not available
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - WARNING: **julia**: not available
  - OK: **bash**: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: **tar**: `tar (GNU tar) 1.34`
  - OK: **gzip**: `gzip 1.11`
  - OK: **curl**: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/1.1.1m zlib/1.2.11 brotli/1.0.9 zstd/1.5.1 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.46.0`
  - OK: **wget**: `GNU Wget 1.21.2 built on linux-gnu.`
  - OK: **python3**: `Python 3.10.1`
  - OK: **node**: `v17.3.0`
  - OK: **Go**: `go version go1.17.6 linux/amd64`
  - OK: **sh**: `Ok`
  - OK: **java**: `Ok`
  - OK: **javac**: `Ok`
  - OK: **npm**: `8.3.2`
  - OK: **pip3**: `pip 20.3.4 from /usr/lib/python3.10/site-packages/pip (python 3.10)`

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found  0.20.3 (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v17.3.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (GCC) 11.1.0
  - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
  - ocaml_interface✓ ✓ ✓ . ✓ 
  - beancount      ✓ . ✓ . . 
  - python         ✓ ✓ ✓ ✓ ✓ 
  - sparql         ✓ ✓ ✓ ✓ ✓ 
  - comment        ✓ . . . . 
  - lua            ✓ ✓ ✓ ✓ ✓ 
  - ocaml          ✓ ✓ ✓ . ✓ 
  - ninja          ✓ . ✓ ✓ . 
  - ql             ✓ ✓ . ✓ ✓ 
  - glsl           ✓ ✓ ✓ ✓ ✓ 
  - json           ✓ ✓ ✓ ✓ . 
  - pug            ✓ . . . ✓ 
  - ledger         ✓ . ✓ ✓ ✓ 
  - php            ✓ ✓ ✓ ✓ ✓ 
  - clojure        ✓ ✓ ✓ . ✓ 
  - supercollider  ✓ ✓ ✓ ✓ ✓ 
  - heex           ✓ . ✓ ✓ ✓ 
  - godot_resource ✓ ✓ ✓ . . 
  - typescript     ✓ ✓ ✓ ✓ ✓ 
  - fennel         ✓ ✓ . . ✓ 
  - query          ✓ ✓ ✓ ✓ ✓ 
  - cpp            ✓ ✓ ✓ ✓ ✓ 
  - vue            ✓ . ✓ ✓ ✓ 
  - latex          ✓ . ✓ . ✓ 
  - make           ✓ . . . ✓ 
  - rst            ✓ ✓ . . ✓ 
  - css            ✓ . ✓ ✓ ✓ 
  - glimmer        ✓ . . . . 
  - erlang         . . . . . 
  - gowork         ✓ . . . ✓ 
  - regex          ✓ . . . . 
  - nix            ✓ ✓ ✓ . ✓ 
  - svelte         ✓ . ✓ ✓ ✓ 
  - prisma         ✓ . . . . 
  - c              ✓ ✓ ✓ ✓ ✓ 
  - teal           ✓ ✓ ✓ ✓ ✓ 
  - java           ✓ ✓ . ✓ ✓ 
  - http           ✓ . . . ✓ 
  - llvm           ✓ . . . . 
  - hjson          ✓ ✓ ✓ ✓ ✓ 
  - gomod          ✓ . . . ✓ 
  - dart           ✓ ✓ . ✓ ✓ 
  - javascript     ✓ ✓ ✓ ✓ ✓ 
  - pioasm         ✓ . . . ✓ 
  - bash           ✓ ✓ ✓ . ✓ 
  - json5          ✓ . . . ✓ 
  - vim            ✓ ✓ . . ✓ 
  - yaml           ✓ ✓ ✓ ✓ ✓ 
  - cmake          ✓ . ✓ . . 
  - zig            ✓ . ✓ ✓ ✓ 
  - bibtex         ✓ . ✓ ✓ . 
  - r              ✓ ✓ . . . 
  - julia          ✓ ✓ ✓ ✓ ✓ 
  - devicetree     ✓ ✓ ✓ ✓ ✓ 
  - jsdoc          ✓ . . . . 
  - gdscript       ✓ ✓ . . ✓ 
  - turtle         ✓ ✓ ✓ ✓ ✓ 
  - pascal         ✓ ✓ ✓ ✓ ✓ 
  - toml           ✓ ✓ ✓ ✓ ✓ 
  - tsx            ✓ ✓ ✓ ✓ ✓ 
  - fusion         ✓ ✓ ✓ ✓ . 
  - scss           ✓ . . ✓ . 
  - yang           ✓ . ✓ . . 
  - hocon          ✓ . . . ✓ 
  - surface        ✓ . ✓ ✓ ✓ 
  - jsonc          ✓ ✓ ✓ ✓ ✓ 
  - dot            ✓ . . . ✓ 
  - go             ✓ ✓ ✓ ✓ ✓ 
  - commonlisp     ✓ ✓ ✓ . . 
  - cuda           ✓ ✓ ✓ ✓ ✓ 
  - c_sharp        ✓ ✓ ✓ . ✓ 
  - elixir         ✓ ✓ ✓ ✓ ✓ 
  - kotlin         ✓ ✓ ✓ . ✓ 
  - ruby           ✓ ✓ ✓ ✓ ✓ 
  - fish           ✓ ✓ ✓ ✓ ✓ 
  - ocamllex       ✓ . . . ✓ 
  - scala          ✓ . ✓ . ✓ 
  - dockerfile     ✓ . . . ✓ 
  - rust           ✓ ✓ ✓ ✓ ✓ 
  - perl           ✓ . . . . 
  - tlaplus        ✓ . ✓ . ✓ 
  - html           ✓ ✓ ✓ ✓ ✓ 
  - graphql        ✓ . . ✓ ✓ 
  - rasi           ✓ ✓ ✓ ✓ . 
  - hcl            ✓ . ✓ ✓ ✓ 

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

provider: health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/bin/python2 does not have the "neovim" module. :help |provider-python|
          /usr/bin/python2.7 does not have the "neovim" module. :help |provider-python|
          python2.6 not found in search path or not executable.
          /usr/bin/python is Python 3.10 and cannot provide Python 2.
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 3:
          /usr/bin/python3 does not have the "neovim" module. :help |provider-python|
          /usr/bin/python3.10 does not have the "neovim" module. :help |provider-python|
          python3.9 not found in search path or not executable.
          python3.8 not found in search path or not executable.
          python3.7 not found in search path or not executable.
          python3.6 not found in search path or not executable.
          /usr/bin/python does not have the "neovim" module. :help |provider-python|
  - INFO: Executable: Not found

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - ADVICE:
      - Install Ruby and verify that `ruby` and `gem` commands work.

## Node.js provider (optional)
  - INFO: Node.js: v17.3.0
  - WARNING: Missing "neovim" npm (or yarn) package.
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

## Perl provider (optional)
  - ERROR: perl provider error:
    - ADVICE:
      - "Neovim::Ext" cpan module is not installed

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - OK: rg: found ripgrep 13.0.0
  - WARNING: fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

## ===== Installed extensions =====

## Telescope Extension: `fzf`
  - INFO: No healthcheck provided

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - INFO: LSP log level : WARN
  - INFO: Log path: /home/eric/.cache/nvim/lsp.log
  - INFO: Log size: 14277 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 13
  - OK: Loaded parser for bash: ABI version 13
  - OK: Loaded parser for beancount: ABI version 13
  - OK: Loaded parser for bibtex: ABI version 13
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for c_sharp: ABI version 13
  - OK: Loaded parser for clojure: ABI version 13
  - OK: Loaded parser for cmake: ABI version 13
  - OK: Loaded parser for comment: ABI version 13
  - OK: Loaded parser for commonlisp: ABI version 13
  - OK: Loaded parser for cpp: ABI version 13
  - OK: Loaded parser for css: ABI version 13
  - OK: Loaded parser for cuda: ABI version 13
  - OK: Loaded parser for dart: ABI version 13
  - OK: Loaded parser for devicetree: ABI version 13
  - OK: Loaded parser for dockerfile: ABI version 13
  - OK: Loaded parser for dot: ABI version 13
  - OK: Loaded parser for elixir: ABI version 13
  - OK: Loaded parser for erlang: ABI version 13
  - OK: Loaded parser for fennel: ABI version 13
  - OK: Loaded parser for fish: ABI version 13
  - OK: Loaded parser for fusion: ABI version 13
  - OK: Loaded parser for gdscript: ABI version 13
  - OK: Loaded parser for glimmer: ABI version 13
  - OK: Loaded parser for glsl: ABI version 13
  - OK: Loaded parser for go: ABI version 13
  - OK: Loaded parser for godot_resource: ABI version 13
  - OK: Loaded parser for gomod: ABI version 13
  - OK: Loaded parser for gowork: ABI version 13
  - OK: Loaded parser for graphql: ABI version 13
  - OK: Loaded parser for hcl: ABI version 13
  - OK: Loaded parser for heex: ABI version 13
  - OK: Loaded parser for hjson: ABI version 13
  - OK: Loaded parser for hocon: ABI version 13
  - OK: Loaded parser for html: ABI version 13
  - OK: Loaded parser for http: ABI version 13
  - OK: Loaded parser for java: ABI version 13
  - OK: Loaded parser for javascript: ABI version 13
  - OK: Loaded parser for jsdoc: ABI version 13
  - OK: Loaded parser for json: ABI version 13
  - OK: Loaded parser for json5: ABI version 13
  - OK: Loaded parser for jsonc: ABI version 13
  - OK: Loaded parser for julia: ABI version 13
  - OK: Loaded parser for kotlin: ABI version 13
  - OK: Loaded parser for latex: ABI version 13
  - OK: Loaded parser for ledger: ABI version 13
  - OK: Loaded parser for llvm: ABI version 13
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for make: ABI version 13
  - OK: Loaded parser for ninja: ABI version 13
  - OK: Loaded parser for nix: ABI version 13
  - OK: Loaded parser for ocaml: ABI version 13
  - OK: Loaded parser for ocaml_interface: ABI version 13
  - OK: Loaded parser for ocamllex: ABI version 13
  - OK: Loaded parser for pascal: ABI version 13
  - OK: Loaded parser for perl: ABI version 13
  - OK: Loaded parser for php: ABI version 13
  - OK: Loaded parser for pioasm: ABI version 13
  - OK: Loaded parser for prisma: ABI version 13
  - OK: Loaded parser for pug: ABI version 13
  - OK: Loaded parser for python: ABI version 13
  - OK: Loaded parser for ql: ABI version 13
  - OK: Loaded parser for query: ABI version 13
  - OK: Loaded parser for r: ABI version 13
  - OK: Loaded parser for rasi: ABI version 13
  - OK: Loaded parser for regex: ABI version 13
  - OK: Loaded parser for rst: ABI version 13
  - OK: Loaded parser for ruby: ABI version 13
  - OK: Loaded parser for rust: ABI version 13
  - OK: Loaded parser for scala: ABI version 13
  - OK: Loaded parser for scss: ABI version 13
  - OK: Loaded parser for sparql: ABI version 13
  - OK: Loaded parser for supercollider: ABI version 13
  - OK: Loaded parser for surface: ABI version 13
  - OK: Loaded parser for svelte: ABI version 13
  - OK: Loaded parser for teal: ABI version 13
  - OK: Loaded parser for tlaplus: ABI version 13
  - OK: Loaded parser for toml: ABI version 13
  - OK: Loaded parser for tsx: ABI version 13
  - OK: Loaded parser for turtle: ABI version 13
  - OK: Loaded parser for typescript: ABI version 13
  - OK: Loaded parser for vim: ABI version 13
  - OK: Loaded parser for vue: ABI version 13
  - OK: Loaded parser for yaml: ABI version 13
  - OK: Loaded parser for yang: ABI version 13
  - OK: Loaded parser for zig: ABI version 13

which_key: health#which_key#check
========================================================================
## WhichKey: checking conflicting keymaps
  - WARNING: conflicting keymap exists for mode **"v"**, lhs: **"["**
  - INFO: rhs: `S]`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"<C-W>"**
  - INFO: rhs: `:q<CR>`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **" s"**
  - INFO: rhs: `:SMLReplStop<CR>:SMLReplStart<CR>:wincmd l<CR>`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"ys"**
  - INFO: rhs: `<Plug>Ysurround`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"yS"**
  - INFO: rhs: `<Plug>YSurround`
  - WARNING: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>u"**
  - INFO: old rhs: `<cmd>UndotreeToggle<CR>`
  - INFO: new rhs: `<cmd>UndotreeToggle<cr>`
  - WARNING: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>e"**
  - INFO: old rhs: `<cmd>NvimTreeToggle<CR>`
  - INFO: new rhs: `<cmd>NvimTreeToggle<cr>`

Thanks in advance to anyone willing to shed some light on the situation!

autochdir

I'm sure this is a user error, but how can you get autochdir to work right (my definition of right :-))?

By default, it seems to be turned off.

I added an option to turn it on.

I

echo &autochdir

and it shows

1

for enabled... but it shows root of project instead of current director.

Then if I manually

:set autochdir

It works like I want...

Help?

Formatting/ text rendering issues

This is an odd one. Not sure where to begin with this.

  • As I move up/down a line, the text seems to freeze and duplicate (see how line 1 is duplicated)
  • If I use a shortcut such as space-f, the whole screen will become disoriented
  • If I scroll up/down, I will begin to see windows that are supposed to be hidden (i.e. the home screen)
  • No icons are displaying

Has anyone experienced anything like this?

Screen Shot 2022-01-17 at 10 42 00 PM

<C-q> visual-block?

Just cloned the project and copied the configuration and saw that <C-q> starts visual-block (like <C-v>). Any ideas why is this happening? I'm trying to find a mapping but there is nothing.

module 'plenary.strings' not found

neovim version is 0.6.0 install from brew

处理 /Users/baba/.config/nvim/init.lua 时发生错误:
E5113: Error while calling lua chunk: ...ack/packer/start/telescope.nvim/lua/telescope/config.lua:1: module 'plenary.strings' not found:
        no field package.preload['plenary.strings']
        no file './plenary/strings.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20211210/share/luajit-2.1.0-beta3/plenary/strings.lua'
        no file '/usr/local/share/lua/5.1/plenary/strings.lua'
        no file '/usr/local/share/lua/5.1/plenary/strings/init.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20211210/share/lua/5.1/plenary/strings.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20211210/share/lua/5.1/plenary/strings/init.lua'
        no file './plenary/strings.so'
        no file '/usr/local/lib/lua/5.1/plenary/strings.so'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20211210/lib/lua/5.1/plenary/strings.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './plenary.so'
        no file '/usr/local/lib/lua/5.1/plenary.so'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20211210/lib/lua/5.1/plenary.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        ...ack/packer/start/telescope.nvim/lua/telescope/config.lua:1: in main chunk
        [C]: in function 'require'
        ...cker/start/telescope.nvim/lua/telescope/actions/init.lua:12: in main chunk
        [C]: in function 'require'
        /Users/baba/.config/nvim/lua/user/telescope.lua:6: in main chunk
        [C]: in function 'require'
        /Users/baba/.config/nvim/init.lua:7: in main chunk

did anyone met this error before?

telescope.action not found

In the master branch getting ERR like telescope.actions not found

  • tried packer compile
nvim --version

NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az87-780

image

Error detected while processing function health#check

I just copied the nvim folder in ~/.config and check if all is good but checkhealth is raising an error :

Running healthchecks...
Error detected while processing function health#check:
line   37:
E684: list index out of range: 0
Press ENTER or type command to continue

My setup

  • MacOS Catalina
  • I removed previous nvim folder in ~/.config
  • I removed previous nvim folder in ~/.local/share``
  • I had a previous version of LunarVim that i removed prior to this setup.

Any idea on what can be wrong ?

Setting `colorcolumn` doesn't work

I was very confused why setting this in options.lua doesn't work:

local options = {
  ...
  colorcolumn = "80",
}

Turns out it was overwritten by this line here that was a hacky solution to a problem that seems to have been fixed now, according to the issue linked in the line above.

vim.wo.colorcolumn = "99999"

Removing that line fixed my problem.

Adding VHDL/Verilog Language Server

Thanks for the awesome configuration
I am a hardware engineer and I use too much of the VHDL and Verilog languages. Unfortunately, both are not supported by NeoVim built-in lsp. I find this language server HDL Checker : https://github.com/suoto/hdl_checker
It provides a Lua configuration for nvim-lspconfig, but I didn't arrive to set up this config.
Could you please check if it works and provide me with some explanation of how to do it?
Thanks.

set formatoptions-=cro fails as other file modifies it

So, I was trying to fix the comment continuation issue with nvim and I was wondering why the :set formatoptions-=cro wasn't working. After some digging, I found that some other file is also globally changing the formatoptions and it's not something that I did.

:verbose set formatoptions this command shows that the /opt/homebrew/Cellar/neovim/0.6.1/share/nvim/runtime/ftplugin/lua.vim file is modifying it.

It seems like this file loads after the init.lua which causes it to overwrite the :set formatoptions-=cro.

Pyright not showing diagnostics

I installed the pyright language server. When writing a python file, it's showing me where errors are, but I'm not getting any on screen message and I'm unsure how to view what the error is?

I'm not sure if this is a me issue or what?

image

Error setting up LSP

I'd like to say thank you for all the work you put into this series!

I tried to give the config a shot by using the git clone command provided in the readme. For some reason, I'm getting the following error

E5113: Error while calling lua chunk: /Users/username/.config/nvim/lua/user/lsp/init.lua:7: attempt to index a
boolean value
stack traceback:
        /Users/username/.config/nvim/lua/user/lsp/init.lua:7: in main chunk
        [C]: in function 'require'
        /Users/username/.config/nvim/init.lua:6: in main chunk

Any idea why that could be the case?

Comments key mappings are not working.

The default key mappings are not working. g is being used by which-key and the new key mappings for linewise commenting is gcA which is very difficult to hit and anyways, is not working well because the "g" starts which-key. The same with the rest of the key mappings for commenting.
Screen Shot 2021-12-19 at 7 37 09 PM

lsp format error

When i was installed successfully and try to format my code , the error just come out.

[null-ls] [ERROR 10:41:55] ...t/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:172: comm
and prettier is not executable (make sure it's installed and on your $PATH)

syntax highlighting and snippet completion for injected languages

I found it difficult to make syntax highlighting and snippet completion work for pieces of code that are written in a different language than the language of the file they are embedded in. I found a hacky solution to cover my situation, but I would like to see a better and more easy way to achieve this.

By default a snippet of html-code inside a javascript file looks like this:
image

So by default there is no syntax highlighting nor html-snippets available in this case.

These are the steps needed to make syntax highlighting and html-snippets work for this case:

  • Add a treesitter query that recognizes the above example is a piece of html-code:
    image

I added this query inside ~/.local/share/nvim/site/pack/packer/start/nvim-treesitter/queries/ecma/injections.scm which probably isn't the best idea. This will probably be deleted when doing a packer clean update?

Now syntax highlighting is working:

image

But still no html-snippet expansion...

  • To make completion work I did the following changes inside lua/user/cmp.lua

image

Now syntax highlighting and html-snippets are working:
image

All sugestions to improve on this are welcome!

:checkhealth Command throwing Errors.

Running :checkhealth throws following output

Running healthchecks...
Error detected while processing function health#check:
line   37:
E684: list index out of range: 0
Press ENTER or type command to continue

Other Things are working fine!
Maybe its just that i did something stupid.

Error detected while processing FileType Autocommands for "*"

I am getting error, when open nvim and trying to enter "Configuration" section.

Error detected while processing FileType Autocommands for "*":
E5108: Error executing lua /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:161: query: invalid field at position 18
stack traceback:
        [C]: in function '_ts_parse_query'
        /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:161: in function 'get_query'
        ...l/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:37: in function 'new'
        /usr/local/share/nvim/runtime/lua/vim/treesitter.lua:45: in function '_create_parser'
        /usr/local/share/nvim/runtime/lua/vim/treesitter.lua:93: in function 'get_parser'
        .../start/nvim-treesitter/lua/nvim-treesitter/highlight.lua:107: in function 'attach'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:458: in function 'attach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:481: in function 'reattach_module'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

Mac 12.1
NVIM v0.7.0-dev+727-g326e74571
Trying to do fresh installation from last commit 7a082a3306b27d59257ce9bc826ab4dc64f69854

Error on Startup

So when starting I getting the following error. I even when into init.lua and commented out all the requires and still get this error

Error detected while processing /Users/jcostanzo/.local/share/nvim/site/pack/packer/start/cmp-
buffer/after/plugin/cmp_buffer.lua:
E5113: Error while calling lua chunk: ...pack/packer/start/cmp-buffer/after/plugin/cmp_buffer.
lua:1: attempt to index a boolean value
stack traceback:
        ...pack/packer/start/cmp-buffer/after/plugin/cmp_buffer.lua:1: in main chunk
Error detected while processing /Users/jcostanzo/.local/share/nvim/site/pack/packer/start/cmp-
cmdline/after/plugin/cmp_cmdline.lua:
E5113: Error while calling lua chunk: ...ck/packer/start/cmp-cmdline/after/plugin/cmp_cmdline.
lua:1: attempt to index a boolean value
stack traceback:
        ...ck/packer/start/cmp-cmdline/after/plugin/cmp_cmdline.lua:1: in main chunk
Error detected while processing /Users/jcostanzo/.local/share/nvim/site/pack/packer/start/cmp-
path/after/plugin/cmp_path.lua:
E5113: Error while calling lua chunk: ...ite/pack/packer/start/cmp-path/after/plugin/cmp_path.
lua:1: attempt to index a boolean value
stack traceback:
        ...ite/pack/packer/start/cmp-path/after/plugin/cmp_path.lua:1: in main chunk
Error detected while processing /Users/jcostanzo/.local/share/nvim/site/pack/packer/start/cmp_
luasnip/after/plugin/cmp_luasnip.lua:
E5113: Error while calling lua chunk: ...ck/packer/start/cmp_luasnip/after/plugin/cmp_luasnip.
lua:1: attempt to index a boolean value
stack traceback:
        ...ck/packer/start/cmp_luasnip/after/plugin/cmp_luasnip.lua:1: in main chunk

OS: Mac OS

Close buffer is not working

buffer close is not working ,

-  ["c"] = { "<cmd>Bdelete! %d<CR>", "Close Buffer" },     
+  ["c"] = { "<cmd>Bdelete!<CR>", "Close Buffer" },       

Error after installing('nvim-tree.diagnostics')

I just uninstalled lunarvim and started my config.

Packer Installed all its stuffs, then after reopening I get this
Vim(autocmd):E216: No such group or event: DiagnosticChanged * lua require'nvim-tree.diagnostics'.update()

How do I fix this?

On OSX 12.1
Nvim V0.6.0-dev+525

Wiring up emmet-ls so that completions work?

I've tried using emmet-ls and the various forks - and the config suggested in a comment on the LunarVim repo, but none of them seem to trigger a completion in this setup. I can do :LspInfo and see that the language server has attached to the buffer, but typing something like div.border doesn't translate into the html that it should.

Any suggestions?

Trying to configure clangd as a language server, running into issues

I'm basically trying to add onto what you've done here in ~/.config/nvim/lua/user/lsp/lsp-installer.lua

local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
if not status_ok then
	return
end

-- Register a handler that will be called for all installed servers.
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
lsp_installer.on_server_ready(function(server)
	local opts = {
		on_attach = require("user.lsp.handlers").on_attach,
		capabilities = require("user.lsp.handlers").capabilities,
	}

	 if server.name == "jsonls" then
	 	local jsonls_opts = require("user.lsp.settings.jsonls")
	 	opts = vim.tbl_deep_extend("force", jsonls_opts, opts)
	 end

	 if server.name == "sumneko_lua" then
	 	local sumneko_opts = require("user.lsp.settings.sumneko_lua")
	 	opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
	 end

	 if server.name == "pyright" then
	 	local pyright_opts = require("user.lsp.settings.pyright")
	 	opts = vim.tbl_deep_extend("force", pyright_opts, opts)
	 end

	 if server.name == "clangd" then
		 local clangd_opts = require("user.lsp.settings.clangd")
		 opts = vim.tbl_deep_extend("force", clangd_opts, opts)
	 end

	-- This setup() function is exactly the same as lspconfig's setup function.
	-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
	server:setup(opts)
end)

I've added the clangd portion. Then, I've added ~/.config/nvim/lua/user/lsp/settings/clangd.lua :

return {
		clangd = {
			cmd = "clangd --query-driver=/usr/bin/arm-unknown-eabi-gcc"
		}
}

This is probably just my poor understanding of lua, but in my brain this should work. It doesn't though. When opening a C file and using :LspInfo, I can see that the cmd is still just clangd:

 Language client log: /home/penguin/.cache/nvim/lsp.log
 Detected filetype:   c
 
 1 client(s) attached to this buffer: 
 
 Client: clangd (id: 1, pid: 26703, bufnr: [1])
 	filetypes:       c, cpp, objc, objcpp
 	autostart:       true
 	root directory:  /tmp/projecttest
 	cmd:             clangd
 
 Configured servers list: clangd

I also can't find any documentation for what settings these "opts" structs actually take for clangd, so I have no idea if it's actually called "cmd" or "command" or what. I'm assuming it's called cmd because LspInfo lists it as cmd.

Error executing vim.schedule lua callback

Error executing vim.schedule lua callback: ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/init.lua:397: String cannot contain newlines stack traceback: [C]: in function 'nvim_buf_set_lines' ...cker/start/nvim-tree.lua/lua/nvim-tree/renderer/init.lua:397: in function 'draw' ...te/pack/packer/start/nvim-tree.lua/lua/nvim-tree/lib.lua:48: in function 'redraw' ...te/pack/packer/start/nvim-tree.lua/lua/nvim-tree/lib.lua:27: in function 'load_project_status' ...te/pack/packer/start/nvim-tree.lua/lua/nvim-tree/lib.lua:25: in function 'load_children' ...te/pack/packer/start/nvim-tree.lua/lua/nvim-tree/lib.lua:39: in function 'init' ...m/site/pack/packer/start/nvim-tree.lua/lua/nvim-tree.lua:106: in function 'on_enter' ...m/site/pack/packer/start/nvim-tree.lua/lua/nvim-tree.lua:365: in function <...m/site/pack/packer/start/nvim-tree.lua/lua/nvim-tree.lua:365>

I am getting this error every time when I open neovim. I am using neovim 0.6.1
image

How to add additional filetypes for LSP clients?

What's the conventional way of adding json to filetypes which lsp clients for tsserver or eslint will attach to with this lua-based neovim setup provided in this repository?

 2 active client(s) not attached to this buffer: 

 Client: tsserver (id: 2, pid: 43699, bufnr: [9])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx
 	autostart:       true
 	root directory:  [hidden]
 	cmd:             typescript-language-server --stdio
 
 Client: eslint (id: 3, pid: 43700, bufnr: [9])
 	filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx, vue
 	autostart:       true
 	root directory:  [hidden]
 	cmd:             vscode-eslint-language-server --stdio

Wrong code in moving text

keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)

The current code is for Insert mode not Normal. I've added the correct code for Insert and Normal mode below:

keymap("i", "<A-j>", "<Esc>:m .+1<CR>==gi", opts)
keymap("i", "<A-k>", "<Esc>:m .-2<CR>==gi", opts)
keymap("n", "<A-j>", ":m .+1<CR>==", opts)
keymap("n", "<A-k>", ":m .-2<CR>==", opts)

timeoutlen = 100ms

Setting timeoutlen to 100 milliseconds in the options file makes it appears like the leader key is not working.

ES5113 `diagnostic` is a nil value

First, thanks for the tutorial videos and this repo.

I get the following error when using branch 06-LSP or any subsequent branch. Here are some example error messages. (I'm truncating home folder to ~ for clarity)

# 06-LSP
Error detected while processing ~/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ~/.config/nvim/lua/user/lsp/handlers.lua:36: attempt to index field 'diagnostic' (a nil value)

# master (commit 8cebbf6b111b664aecf8a29039c483ae4db5afe7)
Error detected while processing ~/.config/nvim/init.lua:                                                                                                              
E5113: Error while calling lua chunk: ...packer/start/nvim-tree.lua/lua/nvim-tree/diagnostics.lua:156: Vim(autocmd):E216: No such group or event: DiagnosticChanged * lua require'nvim-tree.diagnostics'.update()  

Running :checkhealth returns OK for everything except for Python 2 and Perl providers. (I don't use either.) Checking out branch 05-completion does not cause the error.

Unfortunately, I'm new to Lua. Commenting out line 36 in the 06-LSP branch resolved the error, but I'm sure I broke something else.

Build: NVIM v0.6.0-dev+96-g5f01714b2
MacBook Air M1, Monterey 12.0.1

Error executing luv callback

After performing the git clone command provided in the readme, I'm getting the following error:

Error executing luv callback:
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The coroutine failed with this message: vim/shared.lua:489: s: expected string, got nil
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 'callback'
        ...ite/pack/packer/start/gitsigns.nvim/lua/gitsigns/git.lua:182: in function 'callback'
        ...k/packer/start/gitsigns.nvim/lua/gitsigns/subprocess.lua:66: in function <...k/packer/start/gitsigns.nvim/lua/gitsigns/subprocess.lua:52>

Need dependencies with Lua?

Hi Chris,

Thanks for this amazing project.

I'm using Ubuntu 20.04, neovim version v0.4.3.
After I cloned the repo, I found that nothing happened with neovim. I already renamed my old ~/.config/nvim file and removed the whole /local/site/nvim repo.

Wondering if I need some configuration with the Lua or need anyother dependencies.

Thanks,
Junjie

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.