parent
e8af44278a
commit
42eb72eb80
22
init.lua
22
init.lua
|
|
@ -683,6 +683,7 @@ do
|
|||
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
||||
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
||||
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
vim.pack.add { gh 'j-hui/fidget.nvim' }
|
||||
require('fidget').setup {}
|
||||
|
|
@ -844,6 +845,22 @@ do
|
|||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||
require('mason').setup {}
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/mrcjkb/rustaceanvim" },
|
||||
})
|
||||
|
||||
vim.g.rustaceanvim = {
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set("n", "<C-space>", function()
|
||||
vim.cmd.RustLsp { 'hover', 'actions' }
|
||||
end, { buffer = bufnr })
|
||||
vim.keymap.set("n", "<Leader>a", function()
|
||||
vim.cmd.RustLsp('codeAction')
|
||||
end, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
}
|
||||
-- Ensure the servers and tools above are installed
|
||||
--
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
|
|
@ -865,7 +882,7 @@ do
|
|||
end
|
||||
|
||||
vim.pack.add {
|
||||
gh 'dstein64/nvim-scrollview'
|
||||
gh 'dstein64/nvim-scrollview',
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -886,6 +903,7 @@ end
|
|||
end,
|
||||
})
|
||||
|
||||
|
||||
-- ============================================================
|
||||
-- SECTION 7: FORMATTING
|
||||
-- conform.nvim setup and keymap
|
||||
|
|
@ -1020,7 +1038,7 @@ do
|
|||
vim.pack.add { { src = gh 'nvim-treesitter/nvim-treesitter', version = 'main' } }
|
||||
require('nvim-treesitter.install').compilers = { 'zig' }
|
||||
-- Ensure basic parsers are installed
|
||||
local parsers = {'zig', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'python' }
|
||||
local parsers = {'zig', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'python', "rust" }
|
||||
require('nvim-treesitter').install(parsers)
|
||||
|
||||
---@param buf integer
|
||||
|
|
|
|||
Loading…
Reference in New Issue