Remove rust-specific features

writing
Nick Zana 3 years ago
parent fb6de85bc3
commit 0fd1209ff6
No known key found for this signature in database
GPG Key ID: A6E59E60FE474883

@ -84,8 +84,4 @@ local on_attach = function(client, bufnr)
end end
-- Code actions
-- TODO: Generalize to LSP or only attach on Rust buffers
map('n', '<leader>t', '<cmd>RustTest<CR>', options) -- Run test under cursor
return { on_attach = on_attach } return { on_attach = on_attach }

@ -1,22 +1,3 @@
local on_attach = require'keybindings'.on_attach local on_attach = require'keybindings'.on_attach
local capabilities = require'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities()) local capabilities = require'cmp_nvim_lsp'.update_capabilities(vim.lsp.protocol.make_client_capabilities())
local cmp = require'nvim-cmp-cfg'.cmp local cmp = require'nvim-cmp-cfg'.cmp
-- SERVERS
-- rust_analyzer
vim.g.rustfmt_autosave = 1
require'lspconfig'.rust_analyzer.setup{
on_attach = on_attach,
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
procMacro = {
enable = true,
},
checkOnSave = {
command = 'clippy',
extraArgs = "-W clippy::pedantic"
},
}
}
}

@ -31,16 +31,9 @@ local plugins = require('packer').startup(function(use)
use 'hrsh7th/cmp-vsnip' use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/vim-vsnip' use 'hrsh7th/vim-vsnip'
-- Language Specfic
use 'rust-lang/rust.vim'
if packer_bootstrap then if packer_bootstrap then
require('packer').sync() require('packer').sync()
end end
end) end)
-- Required for rust.vim
-- TODO: Convert to lua
vim.cmd([[filetype plugin indent on]])
return plugins return plugins

Loading…
Cancel
Save