Skip to content

Commit b3ad7d3

Browse files
committed
fix(options, dashboard): bugs fix
1 parent c116c1d commit b3ad7d3

5 files changed

Lines changed: 24 additions & 8 deletions

File tree

init.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
require("core.options")
42
require("core.keymaps")
53
require("core.autocmds")

lazy-lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
3-
"SchemaStore.nvim": { "branch": "main", "commit": "c103ea363c4776ea9079eccaae54b42aa537a80e" },
3+
"SchemaStore.nvim": { "branch": "main", "commit": "48dba219db5d45baad6f7491e754706f74d12676" },
44
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
5-
"catppuccin": { "branch": "main", "commit": "193e123cdbc4dd3e86db883d55349e9587f0ded6" },
5+
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
66
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
77
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
88
"git-blame.nvim": { "branch": "main", "commit": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7" },
@@ -21,7 +21,7 @@
2121
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
2222
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
2323
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
24-
"nvim-lspconfig": { "branch": "master", "commit": "a2bd1cf7b0446a7414aaf373cea5e4ca804c9c69" },
24+
"nvim-lspconfig": { "branch": "master", "commit": "f3979663c9c8cd9ad258344b9cfb5ad83cff61c1" },
2525
"nvim-navic": { "branch": "master", "commit": "7d914a39a1ef8f4e22c2c4381abeef7c556f5a13" },
2626
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
2727
"nvim-tree.lua": { "branch": "master", "commit": "eb33612bff2fb31f54946fb5dcadc89e905e81ec" },

lua/core/autocmds.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,21 @@ end,
1616

1717
api.nvim_create_autocmd('TextYankPost', {
1818
callback = function() vim.highlight.on_yank({ timeout = 200 }) end,
19-
})
19+
})
20+
21+
22+
vim.api.nvim_create_autocmd({ "BufEnter", "WinEnter" }, {
23+
callback = function()
24+
local ft = vim.bo.filetype
25+
local bt = vim.bo.buftype
26+
27+
-- Skip dashboard, help, nofile, terminal, floating windows
28+
if bt ~= "" or ft == "dashboard" or ft == "help" then
29+
return
30+
end
31+
32+
vim.wo.number = true
33+
vim.wo.relativenumber = false
34+
end,
35+
})
36+

lua/core/dashboard.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,14 @@ function M.open()
208208
vim.bo[buf].bufhidden = "wipe"
209209
vim.bo[buf].swapfile = false
210210

211+
212+
211213
vim.wo.number = false
212214
vim.wo.relativenumber = false
213215
vim.wo.signcolumn = "no"
214216
vim.wo.cursorline = false
215217
vim.wo.wrap = false
216218
vim.wo.scrolloff = 99999
217-
218219
for _, key in ipairs({ "i", "a", "o", "O", "I", "A" }) do
219220
vim.keymap.set("n", key, "<nop>", { buffer = buf })
220221
end

lua/core/options.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ o.clipboard = "unnamedplus"
55

66

77
o.number = true
8-
o.relativenumber = true
8+
o.relativenumber = false
99

1010

1111
o.termguicolors = true

0 commit comments

Comments
 (0)