How add icon in default statusline? #164
Answered
by
T-727
DinkyTrady
asked this question in
Q&A
-
I want to add icon in default statusline without using statusline plugin because if i used it will take longer for open file |
Beta Was this translation helpful? Give feedback.
Answered by
T-727
Oct 5, 2022
Replies: 2 comments 1 reply
-
This's a fairly open-ended question but here's what I can tell you:
here're some examples if you want to get started:
vim.o.statusline = [[%<%f %{luaeval('require"nvim-web-devicons".get_icon_by_filetype(vim.bo.filetype)')}%h%m%r%=%-14.(%l,%c%V%) %P]]
vim.api.nvim_create_autocmd("BufEnter", {
callback = function ()
vim.o.statusline =
"%<%f "..
require"nvim-web-devicons".get_icon_by_filetype(vim.bo.filetype)..
"%h%m%r%=%-14.(%l,%c%V%) %P"
end
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DinkyTrady
-
@T-727 and how to change color? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This's a fairly open-ended question but here's what I can tell you:
here're some examples if you want to get started: