-
Is there any way to set up Open file which indent with spaces, or open file which indent with tab. Thank you for replying |
Beta Was this translation helpful? Give feedback.
Answered by
fitrh
Jan 11, 2023
Replies: 1 comment 1 reply
-
I think you can try something like this local indent = {
function()
local style = vim.bo.expandtab and "Spaces" or "Tab Size"
local size = vim.bo.expandtab and vim.bo.tabstop or vim.bo.shiftwidth
return style .. ": " .. size
end,
cond = function()
return vim.bo.filetype ~= ""
end,
}
-- in your lualine section
-- ...
sections = {
-- ...
lualine_x = { indent, 'encoding', 'fileformat', 'filetype' },
-- ...
},
-- ... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Gitfz810
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you can try something like this