mirror of
https://github.com/m1ngsama/dotfiles.git
synced 2025-12-24 10:51:24 +00:00
Merge pull request #1 from m1ngsama/optimize/nvim-config-modernization
nvim: modernize and optimize neovim configuration
This commit is contained in:
commit
0a344a6ab6
6 changed files with 27 additions and 24 deletions
|
|
@ -66,7 +66,7 @@ require("lazy").setup({
|
||||||
disabled_plugins = {
|
disabled_plugins = {
|
||||||
"gzip",
|
"gzip",
|
||||||
-- "matchit",
|
-- "matchit",
|
||||||
-- "matchparen",
|
"matchparen", -- using vim-matchup or other alternatives
|
||||||
"netrwPlugin",
|
"netrwPlugin",
|
||||||
"rplugin",
|
"rplugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ vim.opt.smartindent = true
|
||||||
vim.opt.hlsearch = true
|
vim.opt.hlsearch = true
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.showcmd = true
|
vim.opt.showcmd = true
|
||||||
vim.opt.cmdheight = 1
|
|
||||||
vim.opt.laststatus = 3
|
vim.opt.laststatus = 3
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
@ -42,6 +41,5 @@ vim.opt.formatoptions:append({ "r" })
|
||||||
vim.cmd([[au BufNewFile,BufRead *.astro setf astro]])
|
vim.cmd([[au BufNewFile,BufRead *.astro setf astro]])
|
||||||
vim.cmd([[au BufNewFile,BufRead Podfile setf ruby]])
|
vim.cmd([[au BufNewFile,BufRead Podfile setf ruby]])
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.8") == 1 then
|
-- Modern Neovim (0.8+) supports cmdheight = 0
|
||||||
vim.opt.cmdheight = 0
|
vim.opt.cmdheight = 0
|
||||||
end
|
|
||||||
|
|
|
||||||
|
|
@ -78,20 +78,25 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Use aerial.nvim instead of symbols-outline (more actively maintained)
|
||||||
{
|
{
|
||||||
"simrat39/symbols-outline.nvim",
|
"stevearc/aerial.nvim",
|
||||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
keys = { { "<leader>cs", "<cmd>AerialToggle<cr>", desc = "Symbols Outline (Aerial)" } },
|
||||||
cmd = "SymbolsOutline",
|
cmd = "AerialToggle",
|
||||||
opts = {
|
opts = {
|
||||||
position = "right",
|
layout = {
|
||||||
|
default_direction = "right",
|
||||||
|
},
|
||||||
|
attach_mode = "global",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
-- Disabled: using blink.cmp instead
|
||||||
"nvim-cmp",
|
-- {
|
||||||
dependencies = { "hrsh7th/cmp-emoji" },
|
-- "nvim-cmp",
|
||||||
opts = function(_, opts)
|
-- dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
table.insert(opts.sources, { name = "emoji" })
|
-- opts = function(_, opts)
|
||||||
end,
|
-- table.insert(opts.sources, { name = "emoji" })
|
||||||
},
|
-- end,
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ return {
|
||||||
return require("lspconfig.util").root_pattern(".git")(...)
|
return require("lspconfig.util").root_pattern(".git")(...)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
tsserver = {
|
ts_ls = {
|
||||||
root_dir = function(...)
|
root_dir = function(...)
|
||||||
return require("lspconfig.util").root_pattern(".git")(...)
|
return require("lspconfig.util").root_pattern(".git")(...)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("nvim-treesitter.config").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
|
||||||
-- MDX
|
-- MDX
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
|
|
|
||||||
|
|
@ -156,12 +156,12 @@ return {
|
||||||
dashboard = {
|
dashboard = {
|
||||||
preset = {
|
preset = {
|
||||||
header = [[
|
header = [[
|
||||||
██████╗ ███████╗██╗ ██╗ █████╗ ███████╗██╗ ██╗███████╗███████╗
|
███╗ ███╗ ██╗███╗ ██╗ ██████╗ ███████╗ █████╗ ███╗ ███╗ █████╗
|
||||||
██╔══██╗██╔════╝██║ ██║██╔══██╗██╔════╝██║ ██║██╔════╝██╔════╝
|
████╗ ████║███║████╗ ██║██╔════╝ ██╔════╝██╔══██╗████╗ ████║██╔══██╗
|
||||||
██║ ██║█████╗ ██║ ██║███████║███████╗██║ ██║█████╗ █████╗
|
██╔████╔██║╚██║██╔██╗ ██║██║ ███╗███████╗███████║██╔████╔██║███████║
|
||||||
██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══██║╚════██║██║ ██║██╔══╝ ██╔══╝
|
██║╚██╔╝██║ ██║██║╚██╗██║██║ ██║╚════██║██╔══██║██║╚██╔╝██║██╔══██║
|
||||||
██████╔╝███████╗ ╚████╔╝ ██║ ██║███████║███████╗██║██║ ███████╗
|
██║ ╚═╝ ██║ ██║██║ ╚████║╚██████╔╝███████║██║ ██║██║ ╚═╝ ██║██║ ██║
|
||||||
╚═════╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝╚═╝ ╚══════╝
|
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
|
||||||
]],
|
]],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue