Giter Site home page Giter Site logo

custom-nvchad's Introduction

custom-NvChad

My custom config for NvChad, enhancing neovim experience

Issue

(0) 能够完美适配 nvim 的终端, 目前 tabby 表现不好.

[done] (1) 让 goto ref 的功能可视化效果更好 将原来的 vim.lsp.buf.references() 改为 require("telescope.builtin").lsp_references() 即可

(2) 自己实现一个 darcula theme,效果和 clion 尽可能保持一致

[done] (3) 列举出所有诊断 :Telescope diagnostics

[done] (4) 当前打开同一个文件,它记不住上次的位置 修改 custom/init.lua, 使用 vim.cmd 函数

[done] (5) C-p 打开 Telescope keymaps

[done] (6) 自动补全默认不要选中,按 tab 后选中第一个 修改 nvim-cmp 配置,加上 noselect

(7) 按 l 的时候,到行尾后继续按 l,不要自动切到下一行. 按 h 同理

(8) 进入插入模式时, 光标不要变成竖线,这样看不清光标在哪.这个貌似是 nvim 的默认配置

(9) 想多次按下 tab 进行多次缩进,但此时 nvim-cmp 也会进行自动补全,导致第二次tab不是缩进,而是选择items 可能要修改 nvim-cmp, 不是很好解决

[done] (10) 按 goto def 的时候,会出现 warning

warning: multiple different client offset_encodings detected for buffer, this is not supported yet
:LspInfo 如下
 Language client log: /home/nightn/.local/state/nvim/lsp.log
 Detected filetype:   cpp

 2 client(s) attached to this buffer:

 Client: null-ls (id: 1, bufnr: [1, 13])
 	filetypes:       markdown, jsonc, typescript, typescriptreact, javascriptreact, javascript, json, css, html, luau, lua, cuda, proto, c, java, cpp, cs
 	autostart:       false
 	root directory:  /home/nightn/maple/OpenArkCompiler
 	cmd:             <function>

 Client: clangd (id: 2, bufnr: [1, 13])
 	filetypes:       c, cpp, objc, objcpp, cuda, proto
 	autostart:       true
 	root directory:  /home/nightn/maple/OpenArkCompiler
 	cmd:             /home/nightn/.local/share/nvim/mason/bin/clangd

 Configured servers list: cssls, tsserver, lua_ls, clangd, html

[done] (11) 安装 clang-format 失败, 提示 no module named 'wheel'

  Failed
     󰚌 clang-format
      ▼ Displaying full log
        Collecting clang-format==16.0.3
          Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4d/07/df31f6c79403f1d64869e6cac05079a2b120f84b0892a90294f90c8d151d/clang-format-16.0.3.tar.gz
            Complete output from command python setup.py egg_info:
            Traceback (most recent call last):
              File "<string>", line 1, in <module>
              File "/tmp/pip-build-t_chdwrb/clang-format/setup.py", line 2, in <module>
                from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
            ModuleNotFoundError: No module named 'wheel'

            ----------------------------------------
        Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-t_chdwrb/clang-format/
        spawn: /home/nightn/.local/share/nvim/mason/packages/clang-format/venv/bin/python failed with exit code 1 and signal 0.

[解决方案] 手动安装 clang-format, 使用 pip3 install clang-format, 然后再用 mason 安装即可成功. fm 可用, 但是它是对整个 buf 进行 format

[done] (12) auto fix map fi to vim.lsp.buf.code_action({ apply = true })

[done] (13) Git preview/undo 快捷键 hp -> hunk preview hu -> hunk undo

(14) NvChad 的 buffer next 快捷键默认配置为 , 但 和 是映射关系,导致在 的时候出现问题 目前将 和 快捷键都取消了

Markdown 方案

如何在 nvim 中高效的使用 markdown 进行写作, 我认为要完成以下几点.

  • 解决 mac tabby 无法输入中文标点符号的问题. 要么换终端, 要么解决这个问题. 不过, windows tabby 似乎不存在这个问题.

  • Markdown preview 问题. 使用 markdown-preview 解决

  • 快速拷贝粘贴图片的问题. 使用 img-paste.vim 解决

  • 设计一套针对 Markdown 的合理快捷键

  • 必要时配置 dict

  • table 高效输入.

  • 在 markdown 中输出 code 并不像直接在 nvim 中输入 code 那么丝滑.

(1) 安装 markdown-preview 插件时, 编译太慢的解决方案: 手动去插件所在目录执行 npm i; npm run build 即可

(2) nvim 所在的环境是 remote, 但我想使用 host 的 browser 对 markdown 文件进行 preview, 该怎么配置呢? 这个不是什么问题, 参考 markdown-preview 的官方文档即可.

custom-nvchad's People

Contributors

nightn avatar

Stargazers

 avatar

Watchers

 avatar

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.