This commit is contained in:
doryan 2024-08-22 17:45:46 +04:00
parent 066e3ef14e
commit 445cb399ef
7 changed files with 209 additions and 24 deletions

0
NeogitStatus Normal file
View File

View File

@ -4,7 +4,7 @@
-- Forum: https://www.reddit.com/r/lunarvim/ -- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny -- Discord: https://discord.com/invite/Xb9B4Ny
lvim.colorscheme = "monokai-pro-default" lvim.colorscheme = "melange"
lvim.builtin.breadcrumbs.active = false lvim.builtin.breadcrumbs.active = false
require "plugins.init" require "plugins.init"
@ -13,4 +13,4 @@ require "configs.noice"
require "configs.nvimtree" require "configs.nvimtree"
require "configs.bufferline" require "configs.bufferline"
require "configs.dropbar" require "configs.dropbar"
require "configs.dap"

71
lvim/lazy-lock.json Executable file
View File

@ -0,0 +1,71 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" },
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" },
"catppuccin": { "branch": "main", "commit": "ba5f4153a5dad99505baba936bd0373534400ac3" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dropbar.nvim": { "branch": "master", "commit": "aa4c0ab1ade45ff9a3c5d4c06365c9b119f32d36" },
"friendly-snippets": { "branch": "main", "commit": "3e9a3f5a0cfcef1741e352c37bda4e82e5eb846a" },
"fzf-lua": { "branch": "main", "commit": "73bdec9ac5da578376bdc5a705ea80a19baa4942" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"huez.nvim": { "branch": "main", "commit": "d07fe09177e0e9e1dd3115c282c190897fa9fd6d" },
"hybrid.nvim": { "branch": "master", "commit": "8838621a2e299582a0af5b8b96d5515f27b5d058" },
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
"kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" },
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" },
"lir.nvim": { "branch": "master", "commit": "7a9d45de08fecd23a04aca1f96688d744830029e" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"material.nvim": { "branch": "main", "commit": "b5d0ff3ad37ba00cea3dc3dce0b0f555b481c6f4" },
"melange-nvim": { "branch": "master", "commit": "e84f8bc2abc5d6edaa7bd48a16c3078504ecb713" },
"monokai-pro.nvim": { "branch": "master", "commit": "2bad2a92fe0ff6c8581d33a853a1b17592b83239" },
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"neogit": { "branch": "master", "commit": "2b74a777b963dfdeeabfabf84d5ba611666adab4" },
"nlsp-settings.nvim": { "branch": "main", "commit": "707b43110daf27c1aec8c16c2a92c2cb9a06f8df" },
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
"none-ls.nvim": { "branch": "main", "commit": "3a4826687da4310af379515086d71faca4d21288" },
"nord.nvim": { "branch": "main", "commit": "6d6bae56a002a4da507ba263776e9691f47deb5f" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" },
"nvim-cmp": { "branch": "main", "commit": "cd2cf0c124d3de577fb5449746568ee8e601afc8" },
"nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" },
"nvim-dap": { "branch": "master", "commit": "13ce59d4852be2bb3cd4967947985cb0ceaff460" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-treesitter": { "branch": "master", "commit": "d5a1c2b0c8ec5bb377a41c1c414b315d6b3e9432" },
"nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bdccb9c67a42a5e2d99384dc9bfa29b1451528f" },
"nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
"onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
"schemastore.nvim": { "branch": "main", "commit": "8c46453bdf84ad91877effb95e0b6c7b51ea7dda" },
"structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" },
"tailwind-tools.nvim": { "branch": "master", "commit": "94196e8db080eafeeb2be3d6d197a2e960b20eb4" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" },
"tokyonight.nvim": { "branch": "main", "commit": "67afeaf7fd6ebba000633e89f63c31694057edde" },
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
"vim": { "branch": "legacy", "commit": "99d4b7bf1a0a12f2d78f35a159384b1eb8aa9c15" },
"vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" },
"vim-react-snippets": { "branch": "main", "commit": "755e288bd0db1052be4195fcc82a25e28b609e0b" },
"vscode-js-debug": { "branch": "main", "commit": "ca1c6450490dab5d742eac16a08d593533a1a13d" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"winbar.nvim": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" }
}

92
lvim/lua/configs/dap.lua Executable file
View File

@ -0,0 +1,92 @@
local dap = require('dap')
require("dap-vscode-js").setup({
-- node_path = "node", -- Path of node executable. Defaults to $NODE_PATH, and then "node"
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug", -- Path to vscode-js-debug installation.
debugger_cmd = { "js-debug-adapter" }, -- Command to use to launch the debug server. Takes precedence over `node_path` and `debugger_path`.
adapters = { 'node-terminal' }, -- which adapters to register in nvim-dap
-- log_file_path = "(stdpath cache)/dap_vscode_js.log", -- Path for file logging
-- log_file_level = false, -- Logging level for output to file. Set to false to disable file logging.
-- log_console_level = vim.log.levels.ERROR -- Logging level for output to console. Set to false to disable console output.
})
dap.configurations.cpp = {
{
name = "Launch file",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
dap.adapters["pwa-node"] = {
type = "server",
host = "localhost",
port = "${port}",
executable = {
command = "node",
-- 💀 Make sure to update this path to point to your installation
args = {"/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
}
}
dap.configurations.javascript = {
{
type = "pwa-node",
request = "launch",
name = "Launch file",
program = "${file}",
cwd = "${workspaceFolder}",
},
}
dap.adapters.chrome = {
type = "executable",
command = "node",
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js"},
}
dap.adapters.firefox = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js'},
}
dap.configurations.typescriptreact = { -- change to typescript if needed
{
name = "Next.js: debug server-side",
type = "node-terminal",
request = "launch",
command = "npm run dev",
sourceMaps= true,
},
{
name = "Next.js: debug client-side with chrome",
type = "chrome",
request = "launch",
url = "http://localhost:3000"
},
{
name = "Next.js: debug client-side with firefox",
type = "firefox",
request = "launch",
url = 'http://localhost:3000',
webRoot = '${workspaceFolder}',
firefoxExecutable = '/usr/bin/waterfox',
pathMappings = {
{
url = "webpack://_n_e/",
path = "${workspaceFolder}/"
}
},
},
}
dap.configurations.javascriptreact = dap.configurations.typescriptreact;

View File

@ -16,7 +16,7 @@ require("dropbar").setup(
local symbols = sources.path.get_symbols(buf, win, cursor) local symbols = sources.path.get_symbols(buf, win, cursor)
for _, symbol in ipairs(symbols) do for _, symbol in ipairs(symbols) do
-- get correct icon color -- get correct icon color
-- local icon_fg = get_hl_color(symbol.icon_hl, "fg#") local icon_fg = get_hl_color(symbol.icon_hl, "fg#")
symbol.icon_hl = "DropbarSymbol" .. symbol.icon_hl symbol.icon_hl = "DropbarSymbol" .. symbol.icon_hl
local icon_string = "" local icon_string = ""

View File

@ -1,5 +1,4 @@
local map = vim.keymap.set local map = vim.keymap.set
local ufo = require("ufo")
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
@ -14,10 +13,20 @@ map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
map("n", "<C-k>", "<C-w>k", { desc = "switch window up" }) map("n", "<C-k>", "<C-w>k", { desc = "switch window up" })
map("n", "<C-n>", "<cmd>NeoTreeShowToggle<CR>", { desc = "nvimtree toggle window" }) map("n", "<C-n>", "<cmd>NeoTreeShowToggle<CR>", { desc = "nvimtree toggle window" })
map("n", "<leader>e", "<cmd>NeoTreeFocus<CR>", { desc = "nvimtree focus window" })
map("n", "<leader>n", "<cmd>set norelativenumber<CR>", { desc = "toggle line number" }) map("n", "<C-A-l>", "<cmd>BufferLineMoveNext<cr>", { desc = "move buffer to right" })
map("n", "<leader>rn", "<cmd>set relativenumber<CR>", { desc = "toggle relative number" }) map("n", "<C-A-J>", "<cmd>BufferLineMovePrev<cr>", { desc = "move buffer to left" })
map("n", "<Tab>", "<cmd>BufferLineCycleNext<cr>", { desc = "switch to next buffer" })
map("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<cr>", { desc = "switch to prev buffer" })
lvim.builtin.which_key.mappings["ln"] = { "<cmd>set norelativenumber<CR>", "Toggle line number" }
lvim.builtin.which_key.mappings["e"] = { "<cmd>NeoTreeFocus<CR>", "Nvimtree focus window" }
lvim.builtin.which_key.mappings["rn"] = { "<cmd>set relativenumber<CR>", "Toggle relative number" }
lvim.builtin.which_key.mappings["ns"] = { "<Cmd>split<cr>", "Horizontal split" }
lvim.builtin.which_key.mappings["vs"] = { "<Cmd>vsplit<cr>", "Vertical split" }
map("n", "<F9>", "<cmd>DapContinue<cr>")
map("n", "<F5>", "<cmd>DapToggleBreakpoint<cr>")
map("n", "mk", "<cmd>RustLsp moveItem up<cr>") map("n", "mk", "<cmd>RustLsp moveItem up<cr>")
map("n", "m,", "<cmd>RustLsp moveItem down<cr>") map("n", "m,", "<cmd>RustLsp moveItem down<cr>")
@ -27,9 +36,6 @@ map("n", "ca", "<cmd>RustLsp codeAction<cr>")
map("n", "<C-s>", "<cmd>w!<cr>") map("n", "<C-s>", "<cmd>w!<cr>")
map("i", "<C-s>", "<cmd>w!<cr>") map("i", "<C-s>", "<cmd>w!<cr>")
map("n", "<leader>sn", "<Cmd>split<cr>", { desc = "Horizontal split" })
map("n", "<leader>sv", "<Cmd>vsplit<cr>", { desc = "Vertical split" })
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } ) map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } )
map("n", "do", function() map("n", "do", function()
@ -42,13 +48,9 @@ map("n", "dt", function()
require("dapui").toggle() require("dapui").toggle()
end, { desc = "Toggle DAP ui" }) end, { desc = "Toggle DAP ui" })
map("n", "<F9>", "<cmd>DapContinue<cr>", { desc = "Start or continue debug" })
map("n", "+", "<cmd>vertical resize +5<cr>", { desc = "Increase vertical buffer" }) -- make the window biger vertically map("n", "+", "<cmd>vertical resize +5<cr>", { desc = "Increase vertical buffer" }) -- make the window biger vertically
map("n", "-", "<cmd>vertical resize -5<cr>", { desc = "Decrease vertical buffer" }) -- make the window smaller vertically map("n", "-", "<cmd>vertical resize -5<cr>", { desc = "Decrease vertical buffer" }) -- make the window smaller vertically
map("n", "_", "<cmd>horizontal resize +2<cr>", { desc = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and =
map("n", "=", "<cmd>horizontal resize -2<cr>", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and - map("n", "=", "<cmd>horizontal resize -2<cr>", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and -
map("n", "_", "<cmd>horizontal resize +2<cr>", { desc = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and =
map('n', 'zR', ufo.openAllFolds) map("n", "<C-{>", "<cmd>foldopen<cr>")
map('n', 'zM', ufo.closeAllFolds) map("n", "<C-}>", "<cmd>foldclose<cr>")

View File

@ -10,9 +10,33 @@ lvim.plugins = {
} }
} }
}, },
{
"savq/melange-nvim"
},
{
"HoNamDuong/hybrid.nvim",
lazy = false,
priority = 1000,
opts = {},
},
{
'marko-cerovac/material.nvim'
},
{
"rebelot/kanagawa.nvim",
},
{
'mountain-theme/vim'
},
{ {
'fgheng/winbar.nvim' 'fgheng/winbar.nvim'
}, },
{
"gbprod/nord.nvim",
},
{
"vague2k/huez.nvim",
},
{ {
'Bekaboo/dropbar.nvim', 'Bekaboo/dropbar.nvim',
dependencies = { dependencies = {
@ -35,10 +59,6 @@ lvim.plugins = {
{ {
'kyazdani42/nvim-web-devicons' 'kyazdani42/nvim-web-devicons'
}, },
{
'kevinhwang91/nvim-ufo',
dependencies = { 'kevinhwang91/promise-async' },
},
{ {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
event = "VeryLazy", event = "VeryLazy",
@ -54,6 +74,9 @@ lvim.plugins = {
require("dapui").setup() require("dapui").setup()
end end
}, },
{
"mxsdev/nvim-dap-vscode-js"
},
{ {
"microsoft/vscode-js-debug", "microsoft/vscode-js-debug",
lazy = true, lazy = true,
@ -65,9 +88,6 @@ lvim.plugins = {
{ {
"folke/neodev.nvim", opts = {} "folke/neodev.nvim", opts = {}
}, },
{
"mxsdev/nvim-dap-vscode-js"
},
{ {
"mlaursen/vim-react-snippets", "mlaursen/vim-react-snippets",
}, },