initial rust programming
This commit is contained in:
parent
99dec78f89
commit
74716cf6f5
5 changed files with 28 additions and 2 deletions
|
@ -82,8 +82,8 @@ cmp.setup({
|
|||
before = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
copilot = "[COPILOT]",
|
||||
npm = "[NPM]",
|
||||
crates = "[CRATES]",
|
||||
nvim_lua = "[NVIM_LUA]",
|
||||
luasnip = "[SNIPPET]",
|
||||
buffer = "[BUFFER]",
|
||||
|
@ -94,9 +94,9 @@ cmp.setup({
|
|||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "npm" },
|
||||
{ name = "crates" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
|
|
|
@ -22,3 +22,4 @@ require("user.lsp.settings.yamlls")
|
|||
require("user.lsp.settings.volar")
|
||||
require("user.lsp.settings.dockerls")
|
||||
require("user.lsp.settings.rnix")
|
||||
require("user.lsp.settings.taplo")
|
||||
|
|
|
@ -17,6 +17,7 @@ null_ls.setup({
|
|||
diagnostics.markdownlint,
|
||||
formatting.markdownlint,
|
||||
diagnostics.yamllint,
|
||||
formatting.rustfmt,
|
||||
},
|
||||
on_attach = function(client)
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
|
|
6
lua/user/lsp/settings/taplo.lua
Normal file
6
lua/user/lsp/settings/taplo.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
local status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lspconfig.taplo.setup({})
|
|
@ -91,6 +91,24 @@ return packer.startup(function(use)
|
|||
use("SmiteshP/nvim-navic")
|
||||
use("kevinhwang91/nvim-ufo")
|
||||
|
||||
-- Rust Dev
|
||||
use({
|
||||
"simrat39/rust-tools.nvim",
|
||||
config = function()
|
||||
require("rust-tools").setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"saecki/crates.nvim",
|
||||
config = function()
|
||||
require("crates").setup({
|
||||
null_ls = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Telescope
|
||||
use("nvim-telescope/telescope.nvim")
|
||||
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
|
||||
|
|
Reference in a new issue