Skip to content
ayamir edited this page Jan 26, 2023 · 52 revisions

This page is not infrequently updated, so please also check issues opened and closed to find answer.

Clipboard for WSL2 users

Please refer to it and add win32yank.exe to your path.

Wrong configuration may invoke the dialog asking for deleting all plugins

Input n and <CR>

LSP servers don't autostart.

Please check this to make sure your directory can be detected as a working directory.

For example (gopls):

Your root directory need a go.mod and your .go file need to be created first. Then LSP will autostart when you edit .go file next time.

Disable FormatOnSave by default

Set settings["format_on_save"] = false in lua/core/settings.lua

Copilot setup.

Make sure your github account is signed up for copilot.

Then use CopilotAuth command to setup.

Add snippets

I just copy friendly-snippets's package.json to my-snippets directory.

So you need add your snippets follow these steps:

  1. Check the language's snippet file place defined in package.json.

go.json place

  1. So create snippets/go.json and fill content like this:

touch snippets/go.json

go.json content

  1. Finally, check the new snippets!

result

Sqlite on windows

On windows system, sqlite.lua failed to load because of lack of sqlite3.dll. To solve this problem, one can add this line to the end of `lua/core/init.lua:

vim.g.sqlite_clib_path = 'path/to/sqlite3.dll'
  • NOTE: You can download precompiled sqlite from here

LSP server start failed

You need to use the latest LTS version (such as v16.13.2) to make sure LSP installed from npm works normally.

Relevant debug info is located in ~/.cache/nvim/lsp.log.

You can use tail ~/.cache/nvim/lsp.log to check latest error info.

Change dashboard startup image

  1. Prepare your original image.
  2. Use ascii-image-converter convert it to ascii image.
  3. Replace content of dashboard.section.header.val defined in lua/modules/ui/config.lua with your ascii image.
  4. Execute PackerCompile then restart neovim.

Stop auto change directory

comment this line then restart nvim. https://github.com/ayamir/nvimdots/blob/main/lua/core/event.lua#L37

Debug for c/cpp

Make sure first use g++ or clang++ with -g flag to get executable a.out file.

Remove nvimdots

rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
Clone this wiki locally