mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
feat(nvim): Apperance and Cursor Movement
This commit is contained in:
parent
1a5f992384
commit
0069470641
10 changed files with 87 additions and 7 deletions
|
|
@ -10,3 +10,4 @@ require("config.options")
|
|||
require("config.plugins")
|
||||
require("config.colorscheme")
|
||||
require("config.keymaps")
|
||||
require("config.diagnostics")
|
||||
|
|
|
|||
|
|
@ -13,21 +13,23 @@
|
|||
"code_runner.nvim": { "branch": "main", "commit": "65218f8f646fe61e506090522df357539642ae83" },
|
||||
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
|
||||
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" },
|
||||
"hover.nvim": { "branch": "main", "commit": "140c4d0ae9397b76baa46b87c574f5377de09309" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"luasnip-latex-snippets.nvim": { "branch": "main", "commit": "cab134611eb755abe9ba95f5d86969f5cece448d" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "e5bf88e5ea1c4cea5ea96b1e970cb264f7a401a1" },
|
||||
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "d529a99f88e0dff02e0aa275db2f595cd252a2c8" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f3d7c0dafcbc86c4d63f765649c884a03bc1360a" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "d34e62afd3e483fe0fa2f24b6323f3bb1d35ddcc" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "bece284c5322ddf6946fa4bdc383a2bc033269d7" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "37334adf4517fecfd97c0b44e1d4718e377e9e52" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||
|
|
@ -37,6 +39,7 @@
|
|||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "ad055861d17afe058bd835e82292e14a64b51b1d" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
||||
"vim-just": { "branch": "main", "commit": "d07978c23c967c54c04a4dff9b25bcd6de5e91e0" },
|
||||
|
|
|
|||
11
tools/nvim/lua/config/diagnostics.lua
Normal file
11
tools/nvim/lua/config/diagnostics.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
local signs = {
|
||||
Error = "",
|
||||
Warning = "",
|
||||
Hint = "",
|
||||
Information = "",
|
||||
}
|
||||
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
|
@ -3,15 +3,30 @@
|
|||
--- for available server and name
|
||||
local M = {}
|
||||
M.servers = {
|
||||
"ast_grep",
|
||||
"bashls", -- Bash
|
||||
"clangd", -- C/C++
|
||||
"cssls", -- CSS
|
||||
"denols", -- Deno
|
||||
-- "cmake", -- CMake
|
||||
"eslint", -- JavaScript
|
||||
"gopls", -- Go
|
||||
"hls", -- Haskell
|
||||
"html", -- HTML
|
||||
"jsonls", -- JSON
|
||||
"lua_ls", -- Lua
|
||||
"markdown_oxide", -- Markdown
|
||||
"omnisharp", -- C# & F#
|
||||
"powershell_es", -- PowerShell
|
||||
"pyright", -- Python
|
||||
"rust_analyzer", -- Rust
|
||||
"svelte", -- Svelte
|
||||
"svlangserver", -- SystemVerilog
|
||||
"tailwindcss", -- TailwindCSS
|
||||
"taplo", -- TOML
|
||||
"ts_ls", -- TypeScript
|
||||
"vimls", -- vimscript
|
||||
"yamlls", -- YAML
|
||||
}
|
||||
|
||||
M.server_config = {
|
||||
|
|
|
|||
|
|
@ -25,4 +25,17 @@ return {
|
|||
{ import = "plugins.mod.alpha-nvim" },
|
||||
{ import = "plugins.mod.winbar-nvim" },
|
||||
{ import = "plugins.mod.bufferline" },
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
current_line_blame = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,9 +47,23 @@ return {
|
|||
end,
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
"kdheepak/lazygit.nvim",
|
||||
lazy = true,
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,18 @@ return {
|
|||
"github/copilot.vim",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ return {
|
|||
config = function()
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return " " .. icon .. count
|
||||
end,
|
||||
|
||||
show_buffer_icons = true,
|
||||
numbers = "ordinal", -- 显示 buffer 序号
|
||||
close_command = "bdelete! %d", -- 关闭 buffer 的命令
|
||||
right_mouse_command = "bdelete! %d", -- 右键关闭
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ return {
|
|||
show_file_path = true,
|
||||
show_symbols = true,
|
||||
colors = {
|
||||
path = "#9c1d91",
|
||||
path = "",
|
||||
file_name = "",
|
||||
symbols = "",
|
||||
},
|
||||
|
|
@ -31,6 +31,7 @@ return {
|
|||
"spectre_panel",
|
||||
"toggleterm",
|
||||
"qf",
|
||||
"floaterm",
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue