Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
_G.protect_rust_files = function() -- protect rust source files under ~/.rustup/toolchains/ -- idea from https://github.com/Xvezda/vim-readonly/blob/master/plugin/readonly.vim -- and https://github.com/rust-lang/rustup/issues/2550 local protect_dirs = { "" .. vim.fn.expand "~" .. "/.rustup/toolchains/", "" .. vim.fn.expand "~" .. "/.cargo/git/", } for _, prefix in ipairs(protect_dirs) do if string.match(vim.fn.expand "%:p", prefix) ~= nil then vim.bo.readonly = true vim.bo.modifiable = false end end end
_G.protect_rust_files = function() -- protect rust source files under ~/.rustup/toolchains/ -- idea from https://github.com/Xvezda/vim-readonly/blob/master/plugin/readonly.vim -- and https://github.com/rust-lang/rustup/issues/2550 local protect_dirs = { "" .. vim.fn.expand "~" .. "/.rustup/toolchains/", "" .. vim.fn.expand "~" .. "/.cargo/git/", } for _, prefix in ipairs(protect_dirs) do if string.match(vim.fn.expand "%:p", prefix) ~= nil then vim.bo.readonly = true vim.bo.modifiable = false end end end