diff --git a/after/ftplugin/bru.lua b/after/ftplugin/bruno.lua similarity index 100% rename from after/ftplugin/bru.lua rename to after/ftplugin/bruno.lua diff --git a/foo.bru b/foo.bru new file mode 100644 index 0000000..2d29324 --- /dev/null +++ b/foo.bru @@ -0,0 +1,118 @@ +meta { + name: create Zaao Task + type: http + seq: 2 +} + +post { + url: {{baseUrl}}/api/zaao/tasks/ + body: json + auth: inherit +} + +headers { + Accept: application/json +} + +body:json { + [{ + "address": "{{address}}", + "coord_x": {{coord_x}}, + "coord_y": {{coord_y}}, + "date": "{{date}}", + "remote_id": "{{remote_id}}", + "route_number": "{{route_number}}", + "route_type": "{{route_type}}", + "sequence": {{sequence}}, + "status": "{{status}}", + "task_type": "{{task_type}}", + "client_name": "{{client_name}}", + "contacts": "{{contacts}}", + "container_number": "{{container_number}}", + "container_type": "{{container_type}}", + "container_volume": {{container_volume}}, + "pickup_coord_x": "{{pickup_coord_x}}", + "pickup_coord_y": "{{pickup_coord_y}}", + "contract_id": "{{contract_id}}", + "waste_type": "{{waste_type}}", + "emptied_volume": "{{emptied_volume}}", + "extra_addition_in_prcnt": "{{extra_addition_in_prcnt}}", + "additional_volume": {{additional_volume}}, + "container_full_nearby": "{{container_full_nearby}}", + "execution_time": "{{execution_time}}", + "comment": "{{comment}}", + "additional_information": "{{additional_information}}", + "driver_comment": "{{driver_comment}}", + "client_debt": "{{client_debt}}", + "vehicle": {{vehicle}} + }, + { + "remote_id": "string", + "date": "2019-08-24", + "route_number": "string", + "sequence": 2147483647, + "address": "string", + "client_name": "string", + "contacts": "string", + "container_number": "string", + "container_volume": {{container_volume}}, + "coord_x": {{coord_x}}, + "coord_y": {{coord_y}}, + "pickup_coord_x": {{pickup_coord_x}}, + "pickup_coord_y": {{pickup_coord_y}}, + "contract_id": "string", + "waste_type": "string", + "task_type": "string", + "route_type": "string", + "emptied_volume": {{emptied_volume}}, + "extra_addition_in_prcnt": {{extra_addition_in_prcnt}}, + "additional_volume": {{additional_volume}}, + "container_full_nearby": "string", + "execution_time": "2019-08-24T14:15:22Z", + "status": "string", + "comment": "string", + "additional_information": "string", + "driver_comment": "string", + "client_debt": 0.1, + "driver": 3, + "vehicle": {{vehicle}} + }] +} + +script:pre-request { + const { faker } = require("@faker-js/faker"); + bru.setVar("address", faker.location.streetAddress({ useFullAddress:true })); + bru.setVar("coord_x", faker.location.longitude({ precision: 6 })); + bru.setVar("coord_y", faker.location.latitude({ precision: 6 })); + bru.setVar("date", faker.date.anytime().toISOString().split("T")[0]); + bru.setVar("remote_id", `T-${String(faker.number.int({ min: 1, max: 999 })).padStart(3, '0')}`); + bru.setVar("route_number", `R-${String(faker.number.int({ min: 1, max: 999 })).padStart(3, '0')}`); + bru.setVar("route_type", "Test"); + bru.setVar("sequence", faker.number.int({ min: 1, max: 50 })); + bru.setVar("status", faker.helpers.arrayElement(["Pending", "Completed", "Not Completed", "Blocked", "Customer Unavailable"])); + bru.setVar("task_type", faker.helpers.arrayElement(["SA", "NE"])); + bru.setVar("client_name", faker.person.fullName()); + bru.setVar("contacts", faker.phone.number({ style: "international" })); + bru.setVar("container_number", `C-${String(faker.number.int({ min: 1, max: 9999 })).padStart(4, '0')}`); + bru.setVar("container_type", faker.helpers.arrayElement(["STD", "BIO", "REC", "45M3"])); + bru.setVar("container_volume", faker.number.float({ multipleOf: 0.25, min: 0.25, max: 50 })); + bru.setVar("pickup_coord_x", faker.location.longitude({ precision: 6 })); + bru.setVar("pickup_coord_y", faker.location.latitude({ precision: 6 })); + bru.setVar("contract_id", `CONTRACT-${String(faker.number.int({ min: 1, max: 999 })).padStart(3, '0')}`); + bru.setVar("waste_type", faker.helpers.arrayElement(["STD", "ELEC", "NON_STD"])); + bru.setVar("emptied_volume", faker.number.int({ min: 0, max: 1000 })); + bru.setVar("extra_addition_in_prcnt", faker.number.float({ min: 0, max: 100, fractionDigits: 3 })); + bru.setVar("additional_volume", faker.number.float({ multipleOf: 0.25, min: 0, max: 10})); + bru.setVar("container_full_nearby", "yes"); + bru.setVar("execution_time", faker.date.anytime().toISOString()); + bru.setVar("comment", faker.lorem.sentence()); + bru.setVar("additional_information", faker.lorem.sentence()); + bru.setVar("driver_comment", faker.lorem.sentence()); + bru.setVar("client_debt", faker.number.float()); + bru.setVar("driver", faker.number.int({ min: 2, max: 11 })); + bru.setVar("vehicle", faker.number.int({ min: 1, max: 20 })); +} + +docs { + Handle POST requests to create ZaaoTask objects in bulk. +} diff --git a/ftdetect/http.lua b/ftdetect/http.lua new file mode 100644 index 0000000..e2c408b --- /dev/null +++ b/ftdetect/http.lua @@ -0,0 +1,5 @@ +vim.filetype.add({ + extension = { + http = "http", + }, +}) diff --git a/lazy-lock.json b/lazy-lock.json index cc86b76..23d2d91 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -17,25 +17,25 @@ "cmp-dbee": { "branch": "main", "commit": "1650f67b9bf43c029fc37570665ca895a33cdf5a" }, "cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" }, "cmp-git": { "branch": "main", "commit": "ec049036e354ed8ed0215f2427112882e1ea7051" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-pypi": { "branch": "main", "commit": "a73411e5935caa23c6feab34980bb435deadd482" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "code-playground.nvim": { "branch": "main", "commit": "7b257911268ecf7ee11d6fe806193bda2c889e86" }, "codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" }, - "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, - "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, + "conform.nvim": { "branch": "master", "commit": "f4e8837878fc5712d053ba3091a73d27d96a09e2" }, + "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, "crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" }, "cratesearch.nvim": { "branch": "master", "commit": "9d09625d017f6b2e116503f935bc6862961313fa" }, - "curl.nvim": { "branch": "main", "commit": "3d34f39ab837a9f9d6f4393a46df4bd8c576d398" }, + "curl.nvim": { "branch": "main", "commit": "6b64f67cf033b12b4e8249afe03def55ffc9b6cb" }, "darkplus.nvim": { "branch": "master", "commit": "c7fff5ce62406121fc6c9e4746f118b2b2499c4c" }, "darkvoid.nvim": { "branch": "master", "commit": "45be993a5617e05811b6b293c05e6aded7003cc9" }, "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" }, "demicolon.nvim": { "branch": "main", "commit": "ee6e3008c7e70abe3f58103dde49145699700fc5" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "dracula.nvim": { "branch": "main", "commit": "e6128ec3923b92bb2b16e81b4a0f04ed0308038e" }, - "flow.nvim": { "branch": "main", "commit": "76f8eb1ba07cedff8ca9c3910d59ce1ac9000183" }, - "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "flow.nvim": { "branch": "main", "commit": "9005b613fc31d8334db2f1687c594f0b7e29823d" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "garbage-day.nvim": { "branch": "main", "commit": "750ef08ae6031ee3683014c5349144340c08ead6" }, "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, "gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" }, @@ -48,15 +48,15 @@ "hot-reload.nvim": { "branch": "main", "commit": "9094182138635747158da64490a838ba46cf2d6c" }, "http-codes.nvim": { "branch": "main", "commit": "a610788dff2fb5df05b230d73a926c8dc3173c16" }, "hypersonic.nvim": { "branch": "main", "commit": "734dfbfbe51952f102a9b439d53d4267bb0024cd" }, - "image.nvim": { "branch": "master", "commit": "5f8fceca2d1be96a45b81de21c2f98bf6084fb34" }, + "image.nvim": { "branch": "master", "commit": "b3e1af829a56bb038e5f81bf97798a2950064b62" }, "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, "inlay-hint.nvim": { "branch": "main", "commit": "eb5f0579537db271dfedd7f38460cdacb238176f" }, "inlay-hints.nvim": { "branch": "master", "commit": "af84dee42cd118af6d592b06c1c0e45d6432a6c0" }, "jq.nvim": { "branch": "main", "commit": "3a736044a9ff4d2b39919c43e66c8148ce85b6a5" }, "kanagawa.nvim": { "branch": "master", "commit": "ad3dddecd606746374ba4807324a08331dfca23c" }, "lackluster.nvim": { "branch": "main", "commit": "6d206a3af7dd2e8389eecebab858e7d97813fc0c" }, - "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, "lualine-lsp-status": { "branch": "main", "commit": "1218d51d4d0b8881a598a77e5d9f334ac31c6cc7" }, @@ -65,12 +65,12 @@ "markdown-table-mode.nvim": { "branch": "main", "commit": "870d0449c1c78c673faa9637a63036f9537b4caa" }, "markdown-togglecheck": { "branch": "main", "commit": "5e9ee3184109a102952c01ef816babe8835b299a" }, "markdown.nvim": { "branch": "master", "commit": "dfa0d2def6dbf77e9206b16dc90cad4dd23d55d2" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "melange.nvim": { "branch": "master", "commit": "4963ebe8336a78eeedbb18b4fbd546dc27bae510" }, - "neoconf.nvim": { "branch": "main", "commit": "fbe717664a732ab9e62737216bd3d0b6d9f84dbf" }, - "neocord": { "branch": "main", "commit": "587e03390a355e9c364d48638e0e0db2a8431d73" }, + "melange.nvim": { "branch": "master", "commit": "9252c78c7bffd3126b0c9e47e51e0b5211acffb1" }, + "neoconf.nvim": { "branch": "main", "commit": "9d5b46e60f26978b2edeb132086bb8a88a1821d0" }, + "neocord": { "branch": "main", "commit": "4d55d8dab2d5f2f272192add7a2c21982039c699" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, "neogit": { "branch": "master", "commit": "43fa47fb61773b0d90a78ebc2521ea8faaeebd86" }, @@ -80,33 +80,33 @@ "neotest-gtest": { "branch": "main", "commit": "16989561a6356878ec4ecd6afed4f0d7a471d1db" }, "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, - "nightfly.nvim": { "branch": "master", "commit": "fa9007f4c2a0556acae8c755f3658b07e79a360a" }, + "nightfly.nvim": { "branch": "master", "commit": "52519368c21296ad8913d71bdab33252755ba341" }, "nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" }, "nui-components.nvim": { "branch": "main", "commit": "caecfe2089e5ffbe99c2b0e0468da91990263a90" }, - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, - "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, + "nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" }, "nvim-cmp-lsp-rs": { "branch": "main", "commit": "57f29333e6d2b655d5b0edb999b0006d49fde0ca" }, "nvim-colorizer.lua": { "branch": "master", "commit": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb" }, - "nvim-dap": { "branch": "master", "commit": "d0ac996fe4e703844d341a754109948ea5888e23" }, - "nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" }, + "nvim-dap": { "branch": "master", "commit": "567da83810dd9da32f9414d941bc6848715fc102" }, + "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, "nvim-dbee": { "branch": "master", "commit": "21d2cc0844a16262bb6ea93ab3d0a0f20bd87853" }, "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, - "nvim-lspconfig": { "branch": "master", "commit": "e8f9c46c99e1901167a92ab13e2357158e5aabdb" }, + "nvim-lspconfig": { "branch": "master", "commit": "ae8a01bb40848490548e5d07b97ed972ed43c2f9" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" }, - "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, - "nvim-treesitter": { "branch": "master", "commit": "afa0d2a9d06fabd0e09ec7b45ee75a9ebadf7822" }, - "nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" }, + "nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" }, + "nvim-treesitter": { "branch": "master", "commit": "5cf3434c694a94fccfca79588654e57053a68572" }, + "nvim-treesitter-context": { "branch": "master", "commit": "8fd989b6b457a448606b4a2e51f9161700f609a7" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, - "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, - "nvim-ufo": { "branch": "main", "commit": "1ebb9ea3507f3a40ce8b0489fb259ab32b1b5877" }, - "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-ufo": { "branch": "main", "commit": "95cbe2e99901135704aabdc8732d722cf68b12c9" }, + "nvim-web-devicons": { "branch": "master", "commit": "1736cb81bdc42e1ee206081a161bdb2af68fb7a1" }, "ohne-accidents": { "branch": "main", "commit": "832b942a928e74b537a2526eacc6285e26af9589" }, - "oil.nvim": { "branch": "master", "commit": "3c2de37accead0240fbe812f5ccdedfe0b973557" }, + "oil.nvim": { "branch": "master", "commit": "dba037598843973b8c54bc5ce0318db4a0da439d" }, "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, "otter.nvim": { "branch": "main", "commit": "ca9ce67d0399380b659923381b58d174344c9ee7" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, @@ -115,47 +115,47 @@ "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "py-requirements.nvim": { "branch": "main", "commit": "718a99a88bac983d43497df4ab1f986cda1e5d82" }, - "pymple.nvim": { "branch": "main", "commit": "eff337420a294e68180c5ee87f03994c0b176dd4" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "d803ba7668ba390aa4cfd3580183c982cac36fd8" }, + "py-requirements.nvim": { "branch": "main", "commit": "3cf563817a1a976691e4c17538b03143544b19f3" }, + "pymple.nvim": { "branch": "main", "commit": "110cc9499b89f2b7230a0c3a7332b3e4b1ac5b7b" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "8d9a5debf473658c0d1d73fcb51bad1d9aecbf75" }, "rainbow_csv.nvim": { "branch": "main", "commit": "7f3fddfe813641035fac2cdf94c2ff69bb0bf0b9" }, - "rose-pine.nvim": { "branch": "main", "commit": "07a887a7bef4aacea8c7caebaf8cbf808cdc7a8e" }, + "rose-pine.nvim": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" }, "runner.nvim": { "branch": "main", "commit": "9ae6f56b73471174c6c4d47581007c6781fb6b6e" }, - "rustaceanvim": { "branch": "master", "commit": "b2df0caa67d41c63a7284b03e80aeff15d8e31ca" }, + "rustaceanvim": { "branch": "master", "commit": "a244210b28f9055c2b4cfa85c92c8a71c13671c9" }, "spellwarn.nvim": { "branch": "main", "commit": "12734b47b008d912b4925c0bc2c1248eb534409d" }, "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, "tagbar": { "branch": "master", "commit": "5e090da54bf999c657608b6c8ec841ef968d923d" }, "tailwind-fold.nvim": { "branch": "main", "commit": "30b8c04eec28628fbe554fb4f3a26984c4455176" }, "telescope-bibtex.nvim": { "branch": "master", "commit": "289a6f86ebec06e8ae1590533b732b9981d84900" }, - "telescope-frecency.nvim": { "branch": "master", "commit": "872602fad676f735424341bb8e2064a191083423" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, - "telescope-git-diffs.nvim": { "branch": "main", "commit": "366df26227e6d478d5c55e04771d61875c4f22ac" }, + "telescope-frecency.nvim": { "branch": "master", "commit": "a358728043a429d69ecfb317937df66f7cec40d5" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, + "telescope-git-diffs.nvim": { "branch": "main", "commit": "b8e5c9e13b9e27f8ccfd14430d04739b9996ae76" }, "telescope-heading.nvim": { "branch": "main", "commit": "e85c0f69cb64048f56e76548dcb2f10277576df9" }, "telescope-import.nvim": { "branch": "main", "commit": "6ccc0ad05b2906e04c5ba415a7f973229efc6dbc" }, "telescope-lazy.nvim": { "branch": "main", "commit": "810f7859c98e88b9c4e45de16cb5317207c9b3e8" }, - "telescope-luasnip.nvim": { "branch": "master", "commit": "11668478677de360dea45cf2b090d34f21b8ae07" }, + "telescope-luasnip.nvim": { "branch": "master", "commit": "07a2a2936a7557404c782dba021ac0a03165b343" }, "telescope-media-files.nvim": { "branch": "master", "commit": "0826c7a730bc4d36068f7c85cf4c5b3fd9fb570a" }, "telescope-software-licenses.nvim": { "branch": "master", "commit": "fb5fc33b6afc994756e2f372423c365bf66f2256" }, "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, - "tree-sitter-hyprlang": { "branch": "master", "commit": "6858695eba0e63b9e0fceef081d291eb352abce8" }, + "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, + "tree-sitter-bruno": { "branch": "main", "commit": "4c8da45da6537ab8c27018b9f2cf92768f9123c2" }, "treesitter-utils": { "branch": "main", "commit": "df621499e4227f0476f6f4bdb75a9d8dd18d16f2" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "typecheck.nvim": { "branch": "main", "commit": "38f3c135572a287f468bae269f956f4ba53dbddf" }, - "typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" }, - "typst-preview.nvim": { "branch": "master", "commit": "06778d1b3d4d29c34f1faf80947b586f403689ba" }, + "typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" }, + "typst-preview.nvim": { "branch": "master", "commit": "ebf10fabde7406848d165b1ef13bce5d046195be" }, "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, - "vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" }, + "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" }, "vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" }, "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, "vim-tmux-navigator": { "branch": "master", "commit": "424b5caa154bff34dc258ee53cec5a8e36cf7ea8" }, - "vimtex": { "branch": "master", "commit": "44a2f1203ce2b6fcf1ff2b03aeca52c45f8a157e" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }, + "vimtex": { "branch": "master", "commit": "b8bb79b5fb27e9030ade92e75cd9375416f2c666" }, + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, "yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }, - "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/lua/plugins/autopairs.lua b/lua/plugins/autopairs.lua index 91a0670..ff92c02 100644 --- a/lua/plugins/autopairs.lua +++ b/lua/plugins/autopairs.lua @@ -1,6 +1,7 @@ return { "windwp/nvim-autopairs", event = "InsertEnter", + enabled = false, opts = { disable_filetype = { "TelescopePrompt", "spectre_panel" }, disable_in_macro = true, -- disable when recording or executing a macro diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 54874da..90e115b 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -9,6 +9,7 @@ return { function() require("conform").format({ async = true, lsp_fallback = true }) end, + mode = "", desc = "[F]ormat buffer", }, }, @@ -38,10 +39,19 @@ return { yaml = { "yamlfmt" }, ["_"] = { "trim_whitespace" }, }, - format_on_save = { - lsp_fallback = true, - timeout_ms = 500, - }, + format_on_save = function(bufnr) + -- Disable formatting for .bru files + local bufname = vim.api.nvim_buf_get_name(bufnr) + if bufname:match("%.bru$") then + return false + end + + -- Return normal format settings for other files + return { + timeout_ms = 500, + lsp_fallback = true, + } + end, log_level = vim.log.levels.ERROR, notify_on_error = true, }, diff --git a/lua/plugins/image.lua b/lua/plugins/image.lua index 0ef7b6f..c9c85c6 100644 --- a/lua/plugins/image.lua +++ b/lua/plugins/image.lua @@ -16,7 +16,7 @@ return { filetypes = { "norg" }, }, typst = { - enabled = true, + enabled = false, filetypes = { "typst" }, }, html = { diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 6b8cd5d..112392a 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -31,18 +31,18 @@ return { -- When enabled, will watch the `.git/` directory for changes and refresh the status buffer in response to filesystem -- events. filewatcher = { - interval = 1000, + interval = 500, enabled = true, }, -- "ascii" is the graph the git CLI generates -- "unicode" is the graph like https://github.com/rbong/vim-flog + -- "kitty" is the graph like https://github.com/isakbm/gitgraph.nvim - use https://github.com/rbong/flog-symbols if you don't use Kitty graph_style = "ascii", -- Used to generate URL's for branch popup action "pull request". git_services = { ["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1", ["bitbucket.org"] = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1", ["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", - ["git.modulation.lv"] = "https://git.modulation.lv/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", }, -- Allows a different telescope sorter. Defaults to 'fuzzy_with_index_bias'. The example below will use the native fzf -- sorter instead. By default, this function returns `nil`. @@ -80,23 +80,55 @@ return { -- Change the default way of opening neogit kind = "tab", -- Disable line numbers and relative line numbers - disable_line_numbers = true, + disable_line_numbers = false, -- The time after which an output console is shown for slow running commands - console_timeout = 2000, + console_timeout = 1000, -- Automatically show console if a command takes more than console_timeout milliseconds auto_show_console = true, + notification_icon = "󰊢", status = { recent_commit_count = 10, }, commit_editor = { kind = "auto", + show_head_commit_hash = true, + recent_commit_count = 10, + HEAD_padding = 10, + HEAD_folded = false, + mode_padding = 3, + mode_text = { + M = "modified", + N = "new file", + A = "added", + D = "deleted", + C = "copied", + U = "updated", + R = "renamed", + DD = "unmerged", + AU = "unmerged", + UD = "unmerged", + UA = "unmerged", + DU = "unmerged", + AA = "unmerged", + UU = "unmerged", + ["?"] = "", + }, }, commit_select_view = { kind = "tab", + show_staged_diff = true, + -- Accepted values: + -- "split" to show the staged diff below the commit editor + -- "vsplit" to show it to the right + -- "split_above" Like :top split + -- "vsplit_left" like :vsplit, but open to the left + -- "auto" "vsplit" if window would have 80 cols, otherwise "split" + staged_diff_split_kind = "split", + spell_check = true, }, commit_view = { kind = "vsplit", - verify_commit = os.execute("which gpg") == 0, -- Can be set to true or false, otherwise we try to find the binary + verify_commit = vim.fn.executable("gpg") == 1, -- Can be set to true or false, otherwise we try to find the binary }, log_view = { kind = "tab", @@ -108,7 +140,7 @@ return { kind = "tab", }, merge_editor = { - kind = "auto", + kind = "tab", }, tag_editor = { kind = "auto", @@ -119,6 +151,12 @@ return { popup = { kind = "split", }, + stash = { + kind = "tab", + }, + refs_view = { + kind = "tab", + }, signs = { -- { CLOSED, OPENED } hunk = { "", "" }, @@ -140,6 +178,11 @@ return { -- is also selected then telescope is used instead -- Requires you to have `ibhagwan/fzf-lua` installed. fzf_lua = nil, + + -- If enabled, uses mini.pick for menu selection. If the telescope integration + -- is also selected then telescope is used instead + -- Requires you to have `echasnovski/mini.pick` installed. + mini_pick = nil, }, sections = { -- Reverting/Cherry Picking @@ -193,6 +236,13 @@ return { ["q"] = "Close", [""] = "Submit", [""] = "Abort", + [""] = "PrevMessage", + [""] = "NextMessage", + [""] = "ResetMessage", + }, + commit_editor_I = { + [""] = "Submit", + [""] = "Abort", }, rebase_editor = { ["p"] = "Pick", @@ -209,6 +259,12 @@ return { ["gj"] = "MoveDown", [""] = "Submit", [""] = "Abort", + ["[c"] = "OpenOrScrollUp", + ["]c"] = "OpenOrScrollDown", + }, + rebase_editor_I = { + [""] = "Submit", + [""] = "Abort", }, finder = { [""] = "Select", @@ -218,20 +274,33 @@ return { [""] = "Previous", [""] = "Next", [""] = "Previous", - [""] = "MultiselectToggleNext", - [""] = "MultiselectTogglePrevious", + [""] = "InsertCompletion", + [""] = "MultiselectToggleNext", + [""] = "MultiselectTogglePrevious", + -- [""] = "MultiselectTogglePrevious", + ["q"] = "Close", [""] = "NOP", + [""] = "ScrollWheelDown", + [""] = "ScrollWheelUp", + [""] = "NOP", + [""] = "NOP", + [""] = "MouseClick", + ["<2-LeftMouse>"] = "NOP", }, -- Setting any of these to `false` will disable the mapping. popup = { ["?"] = "HelpPopup", ["A"] = "CherryPickPopup", - ["D"] = "DiffPopup", + ["d"] = "DiffPopup", ["M"] = "RemotePopup", ["P"] = "PushPopup", ["X"] = "ResetPopup", ["Z"] = "StashPopup", + ["i"] = "IgnorePopup", + ["t"] = "TagPopup", ["b"] = "BranchPopup", + ["B"] = "BisectPopup", + ["w"] = "WorktreePopup", ["c"] = "CommitPopup", ["f"] = "FetchPopup", ["l"] = "LogPopup", @@ -239,32 +308,42 @@ return { ["p"] = "PullPopup", ["r"] = "RebasePopup", ["v"] = "RevertPopup", - ["w"] = "WorktreePopup", }, status = { + ["j"] = "MoveDown", + ["k"] = "MoveUp", + ["o"] = "OpenTree", ["q"] = "Close", ["I"] = "InitRepo", ["1"] = "Depth1", ["2"] = "Depth2", ["3"] = "Depth3", ["4"] = "Depth4", + ["Q"] = "Command", [""] = "Toggle", ["x"] = "Discard", ["s"] = "Stage", ["S"] = "StageUnstaged", [""] = "StageAll", ["u"] = "Unstage", + ["K"] = "Untrack", ["U"] = "UnstageStaged", + ["y"] = "ShowRefs", ["$"] = "CommandHistory", - -- ["#"] = "Console", ["Y"] = "YankSelected", [""] = "RefreshBuffer", [""] = "GoToFile", + [""] = "GoToFile", + [""] = "PeekFile", [""] = "VSplitOpen", [""] = "SplitOpen", [""] = "TabOpen", ["{"] = "GoToPreviousHunkHeader", ["}"] = "GoToNextHunkHeader", + ["[c"] = "OpenOrScrollUp", + ["]c"] = "OpenOrScrollDown", + [""] = "PeekUp", + [""] = "PeekDown", }, }, }, diff --git a/lua/plugins/silicon.lua b/lua/plugins/silicon.lua index 7e8041f..0ab1948 100644 --- a/lua/plugins/silicon.lua +++ b/lua/plugins/silicon.lua @@ -6,6 +6,7 @@ return { -- the font settings with size and fallback font font = "JetBrainsMono NF=34", -- the theme to use, depends on themes available to silicon + -- theme = "Rosé Pine", theme = "Dracula", -- the background color outside the rendered os window background = "#1a1b26", @@ -17,7 +18,7 @@ return { -- whether to have the os window rendered with rounded corners no_round_corner = false, -- whether to put the close, minimize, maximise traffic light controls on the border - no_window_controls = false, + no_window_controls = true, -- whether to turn off the line numbers no_line_number = false, -- with which number the line numbering shall start, the default is 1, but here a @@ -48,7 +49,7 @@ return { return "~/Pictures/screenshots/code/" .. os.date("!%Y_%m_%d-%H_%M_%S") .. ".png" end, -- whether to put the image onto the clipboard, may produce an error if run on WSL2 - to_clipboard = false, + to_clipboard = true, -- the silicon command, put an absolute location here, if the command is not in your PATH command = "silicon", -- a string or function returning a string that defines the title showing in the image diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 6eee32a..35aacda 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -5,11 +5,21 @@ return { "nvim-treesitter/nvim-treesitter-context", "JoosepAlviste/nvim-ts-context-commentstring", "nvim-treesitter/nvim-treesitter-textobjects", - "luckasRanarison/tree-sitter-hyprlang", + "kristoferssolo/tree-sitter-bruno", }, opts = { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "json", "http", "markdown_inline", "sql" }, -- one of "all" or a list of languages + ensure_installed = { + "cpp", + "lua", + "rust", + "python", + "markdown", + "json", + "http", + "markdown_inline", + "sql", + }, -- one of "all" or a list of languages -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, -- Automatically install missing parsers when entering buffer diff --git a/lua/plugins/typescript-tools.lua b/lua/plugins/typescript-tools.lua index d08ac4d..ceff509 100644 --- a/lua/plugins/typescript-tools.lua +++ b/lua/plugins/typescript-tools.lua @@ -4,6 +4,10 @@ return { ft = { "javascriptreact", "typescriptreact", "javascript", "typescript" }, opts = { handlers = {}, + on_attach = function(client) + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + end, settings = { -- spawn additional tsserver instance to calculate diagnostics on it separate_diagnostic_server = true, @@ -26,7 +30,10 @@ return { -- memory limit in megabytes or "auto"(basically no limit) tsserver_max_memory = "auto", -- described below - tsserver_format_options = {}, + tsserver_format_options = function(ft) + -- Return empty table to disable formatting + return {} + end, tsserver_file_preferences = { includeInlayParameterNameHints = "all", includeInlayParameterNameHintsWhenArgumentMatchesName = false, diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index f9ecf44..1637655 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -24,6 +24,13 @@ return { }, { { "C", vim.cmd.bdelete, desc = "[C]lose Buffer" }, + { + "X", + function() + vim.cmd("!chmod +x %") + end, + desc = "Make E[x]ecutable", + }, { "c", group = "[C]url", { "cC", group = "[C]SV" } }, { "x", group = "Trouble" }, { "g", group = "[G]it" }, diff --git a/lua/solo/autocmds.lua b/lua/solo/autocmds.lua index 61f7e23..bbea0c4 100644 --- a/lua/solo/autocmds.lua +++ b/lua/solo/autocmds.lua @@ -30,19 +30,7 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, { -- Highlight Yanked Text vim.api.nvim_create_autocmd({ "TextYankPost" }, { callback = function() - vim.highlight.on_yank({ higroup = "Visual", timeout = 200 }) - end, -}) - --- Format File on Save -vim.api.nvim_create_autocmd({ "BufWritePre" }, { - callback = function() - local file_path = vim.fs.normalize(vim.fn.expand("%:p")):lower() - local exclude_pattern = "dio" - - if not string.match(file_path:lower(), exclude_pattern:lower()) then - vim.lsp.buf.format() - end + vim.highlight.on_yank({ higroup = "Visual", timeout = 100 }) end, }) @@ -56,7 +44,7 @@ vim.api.nvim_create_autocmd({ "InsertEnter" }, { vim.api.nvim_create_autocmd({ "BufWinEnter" }, { pattern = "**/Codnity/**", callback = function() - vim.opt.colorcolumn = "79" + vim.opt.colorcolumn = "92" end, }) @@ -88,15 +76,6 @@ vim.filetype.add({ pattern = { [".*/hypr/.*%.conf"] = "hyprlang", }, - extension = { - ["http"] = "http", - }, -}) - -vim.filetype.add({ - pattern = { - ["*.bru"] = "js", - }, }) vim.api.nvim_create_autocmd({ "VimEnter" }, { diff --git a/spell/lv.utf-8.add b/spell/lv.utf-8.add index 0b11906..977b6c4 100644 --- a/spell/lv.utf-8.add +++ b/spell/lv.utf-8.add @@ -244,3 +244,9 @@ izvietots darbplūsmai darbplūsma izvietotošanas +vienībtesti +formatēšana +atkļūdošanas +darbplūsmas +Skaitliska +komponentes diff --git a/spell/lv.utf-8.add.spl b/spell/lv.utf-8.add.spl index fae19ac..0b338d7 100644 Binary files a/spell/lv.utf-8.add.spl and b/spell/lv.utf-8.add.spl differ