status line reasonalble fix
This commit is contained in:
12
README.md
12
README.md
@@ -46,3 +46,15 @@
|
||||
└── test
|
||||
└── main.py
|
||||
```
|
||||
|
||||
cd ~/.config/nvim/pack/nvim/start
|
||||
|
||||
git clone https://github.com/nvim-tree/nvim-tree.lua
|
||||
git clone https://github.com/hrsh7th/nvim-cmp
|
||||
git clone https://github.com/neovim/nvim-lspconfig
|
||||
git clone https://github.com/hrsh7th/cmp-nvim-lsp
|
||||
git clone https://github.com/lewis6991/gitsigns.nvim
|
||||
git clone https://github.com/folke/flash.nvim
|
||||
git clone https://github.com/nvim-telescope/telescope.nvim
|
||||
git clone https://github.com/nvim-lua/plenary.nvim
|
||||
|
||||
|
||||
11
init.lua
11
init.lua
@@ -58,3 +58,14 @@ require("nvim-treesitter").setup({
|
||||
})
|
||||
|
||||
require("rakshit")
|
||||
|
||||
function _G.my_statusline()
|
||||
local w = vim.api.nvim_win_get_width(0)
|
||||
if w > 140 then
|
||||
return "%F %y %m %= %l:%c %p%%"
|
||||
else
|
||||
return "%f %= %l:%c"
|
||||
end
|
||||
end
|
||||
|
||||
vim.o.statusline = "%!v:lua.my_statusline()"
|
||||
|
||||
@@ -72,3 +72,7 @@ setup("gopls", {
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
setup("clangd", {
|
||||
cmd = { "clangd", "--background-index", "--query-driver=/usr/bin/gcc,/usr/bin/g++",},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user