感谢大佬 #2
Replies: 13 comments 18 replies
-
|
抱歉,回复的有些晚。 第一点,node 和 npm 我认为是很有必要的,它带来了许多东西
相比于手动的去安装它们,node 能够节约非常多的时间来快速的安装这些软件。 第二点,翻墙的问题。你可以试试 clash for windows,一款非常棒的翻墙软件。 如果实在不能翻墙也没关系,packer 包管理可以设置插件下载源,你可以手动设置从 github 镜像源下载这些插件,而不是从 github 原站。 npm 也可以设置淘宝镜像源,下载也很快。 第三点,依赖问题。在 README 文档中,我已经将这个项目目前使用到的依赖都罗列了出来: 第四点,快捷键的注释。因为日后我可能会添加新的插件,快捷键可能会发生变更。所以我不想详细的阐述每一个按键是做什么的,后面改动会比较麻烦。 我创建了一个 QQ 群,如果你有啥问题可以直接加进来问:978088231 |
Beta Was this translation helpful? Give feedback.
-
|
在windows下aux是设备名,导致git失败。如果新建aux目录会提示‘指定的设备名无效’ |
Beta Was this translation helpful? Give feedback.
-
|
plugins.lanaguage 是language吗 是否拼错了? |
Beta Was this translation helpful? Give feedback.
-
|
欸,太客气了。还是大佬你的项目好啊 mrjones2014/nvim-ts-rainbow 好像也依赖nvim-treesitter 也需要加个after tami5/sqlite.lua 这个项目好像失效了 nvim-telescope/telescope-fzf-native.nvim 这个与nvim-telescope/telescope.nvim 联系太紧密了 M.telescope.load_extension("fzf") 关于phaazon/hop.nvim的快捷键,官方的案例好像提供了替换默认f/F/t/T的方式。可以在当前行中选择查找到的哪一个字符串,还有也有个'/'(:HopPattern)的,不知道你知道不知道。 有没有什么方式设置多个键的快捷键,比如<ctrl+alt+l> 这种的,有ctrl+alt ? |
Beta Was this translation helpful? Give feedback.
-
|
原来替换是
nvim-tree/nvim-tree.lua |
Beta Was this translation helpful? Give feedback.
-
|
@askfiy
你有这样的错误吗?这部分配置我应该没有怎么动过。 |
Beta Was this translation helpful? Give feedback.
-
|
居然这么晚了 因为测试我装了两个lsp 一个mason装的 get_installed_servers 还是会获取到 |
Beta Was this translation helpful? Give feedback.
-
|
因为你已经安装了它,解注释是无用的。发自我的 iPhone在 2023年1月12日,00:15,robertenjoy ***@***.***> 写道:
居然这么晚了
因为测试我装了两个lsp 一个mason装的
然后发现 mason注解掉那个lsp还是会加载
get_installed_servers 还是会获取到
然后填入默认值配置进行加载。
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
稍微做下处理,(●ˇ∀ˇ●) nvim-lspconfg.lua
for _, server_name in ipairs(M.mason_lspconfig.get_installed_servers()) do
-- 遍历配置,当没有此lsp配置时不加载
local mason_conf = require("config/basic/mason")
local is_exist_conf = false
for _, v in ipairs(mason_conf.installer_resources.lsp) do
if server_name == v then
is_exist_conf = true
break
end
end
-- 没有continue就算了毕竟lua确实没有 连goto也没有(提示语法错误,可能因为版本或nvim删了) 那只能写丑一点了
if is_exist_conf == true then
local require_path = string.format("%s%s", configurations_dir_path, server_name)
local ok, settings = pcall(require, require_path)
if not ok then
settings = {}
end
settings.capabilities = aux_lspconfig.get_capabilities()
settings.handlers = aux_lspconfig.get_headlers(settings)
settings.on_attach = function(client, bufnr)
M.nvim_navic.attach(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
-- close semantic tokens
client.server_capabilities.semanticTokensProvider = nil
end
M.lspconfig[server_name].setup(settings)
end
enddap配置 c.lua
local cpptools_path = require("mason-registry").get_package("cpptools"):get_install_path() .. "/extension"
local cpptools_bin = cpptools_path .. "/debugAdapters/bin/OpenDebugAD7"
return {
adapters = {
codelldb = { -- 不使用
type = "server",
port = "${port}",
executable = {
-- CHANGE THIS to your path!
-- command = "/absolute/path/to/codelldb/extension/adapter/codelldb",
command = codelldb_bin,
args = { "--port", "${port}" },
-- On windows you may have to uncomment this:
-- detached = false,
},
},
cppdbg = {
id = "cppdbg",
type = "executable",
-- command = "/absolute/path/to/cpptools/extension/debugAdapters/bin/OpenDebugAD7",
command = cpptools_bin,
-- If you're on Windows, use this definition instead:
-- options = {
-- detached = false,
-- },
},
},
configurations = {
rust = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function() -- 指定debug的可执行二进制文件 需要在项目根目录下开始编辑文件 不然workSpace路径不对,导致getcwd()返回结果不是想要的
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/"..vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t'), "file")
end,
cwd = "${workspaceFolder}",
stopAtEntry = true,
},
},
c = conf, -- 与上配置类似 需要改program项 (这里并没有定义conf变量)
cpp = conf,
},
}
|
Beta Was this translation helpful? Give feedback.
-
|
刚看到了提交记录,居然因为aux改了这么多。 |
Beta Was this translation helpful? Give feedback.
-
|
需要一些简单的说明来知道这些插件是用来干嘛的。在配置文件内再提供更多的使用说明就更好了,好久没用了,导致我是一个一个查过来的。哭。虽然确实很麻烦。 |
Beta Was this translation helpful? Give feedback.
-
|
@askfiy 新增一个插件在里面,死活不生效,找了半天原因没找到,差点哭了😭。 |
Beta Was this translation helpful? Give feedback.
-
|
Emmmm,忽略了发自我的 iPhone在 2023年1月17日,17:17,robertenjoy ***@***.***> 写道:
@askfiy
需要把language目录的名字也修改下
新增一个插件在里面,死活不生效,找了半天原因没找到,差点哭了😭。
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
感谢大佬的项目,看着知乎,然后根据这个项目终于装上了部分。
在装的过程中遇到的难题
部分插件需要依赖其他的软件,而且很大,如node等。
像我这种无法翻墙或下载速度很慢的感觉很难受,
如果有一个部分说明下这些插件有什么用,需要安装哪些依赖,就好了
这样我就可以选择性的不去装那些插件。
以下是我根据作者知乎找到的部分内容
nvim-lint 代码诊断 需要nodejs和npm 让python下载语言服务器pyright
nvim-treesitter 语法高亮 需要build-essential(gcc工具包) tar curl git
neoformat 代码格式化 需要手动下载各个语言的格式化程序 lua:直接通过 npm 安装 npm install -g lua-fmt
nvim-spectre 当前工作区下跨文件修改某段字符 ripgrep
telescope 模糊搜索文件、文字、文档等 fd ripgrep
Beta Was this translation helpful? Give feedback.
All reactions