mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
1 Commits
47a651be55
...
v0.10.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6584bec3 |
@@ -278,32 +278,6 @@ if utils.executable("lua-language-server") then
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- settings for rust-analyzer is copied from https://rust-analyzer.github.io/manual.html#nvim-lsp
|
|
||||||
if utils.executable("rust-analyzer") then
|
|
||||||
lspconfig.rust_analyzer.setup {
|
|
||||||
on_attach = custom_attach,
|
|
||||||
settings = {
|
|
||||||
['rust-analyzer'] = {
|
|
||||||
imports = {
|
|
||||||
granularity = {
|
|
||||||
group = "module",
|
|
||||||
},
|
|
||||||
prefix = "self",
|
|
||||||
},
|
|
||||||
cargo = {
|
|
||||||
buildScripts = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
procMacro = {
|
|
||||||
enable = true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Change diagnostic signs.
|
-- Change diagnostic signs.
|
||||||
fn.sign_define("DiagnosticSignError", { text = "🆇", texthl = "DiagnosticSignError" })
|
fn.sign_define("DiagnosticSignError", { text = "🆇", texthl = "DiagnosticSignError" })
|
||||||
fn.sign_define("DiagnosticSignWarn", { text = "⚠️", texthl = "DiagnosticSignWarn" })
|
fn.sign_define("DiagnosticSignWarn", { text = "⚠️", texthl = "DiagnosticSignWarn" })
|
||||||
|
|||||||
@@ -54,13 +54,6 @@ api.nvim_create_autocmd({ "BufWritePre" }, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
api.nvim_create_autocmd({ "BufWritePre" }, {
|
|
||||||
pattern = {"*.c", "*.cc", "*.cpp", "*.h", "*.rs", "*.py"},
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format { asnyc = false }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Automatically reload the file if it is changed outside of Nvim, see https://unix.stackexchange.com/a/383044/221410.
|
-- Automatically reload the file if it is changed outside of Nvim, see https://unix.stackexchange.com/a/383044/221410.
|
||||||
-- It seems that `checktime` does not work in command line. We need to check if we are in command
|
-- It seems that `checktime` does not work in command line. We need to check if we are in command
|
||||||
-- line before executing this command, see also https://vi.stackexchange.com/a/20397/15292 .
|
-- line before executing this command, see also https://vi.stackexchange.com/a/20397/15292 .
|
||||||
|
|||||||
@@ -588,6 +588,12 @@ local plugin_specs = {
|
|||||||
-- luarocks_build_args = { "--with-lua=/my/path" }, -- extra options to pass to luarocks's configuration script
|
-- luarocks_build_args = { "--with-lua=/my/path" }, -- extra options to pass to luarocks's configuration script
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"catgoose/nvim-colorizer.lua",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = { -- set to setup table
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("lazy").setup {
|
require("lazy").setup {
|
||||||
|
|||||||
Reference in New Issue
Block a user