├── LICENSE ├── README.md ├── colors └── visual_studio_code.vim ├── lua ├── lualine │ └── themes │ │ └── visual_studio_code.lua └── visual_studio_code │ ├── colors │ ├── dark.lua │ ├── init.lua │ └── light.lua │ ├── config.lua │ ├── core │ ├── basic.lua │ ├── expands │ │ ├── aerial │ │ │ └── init.lua │ │ ├── bufferline │ │ │ ├── filetype_icons.lua │ │ │ └── init.lua │ │ ├── dbui │ │ │ └── init.lua │ │ ├── gitsigns │ │ │ └── init.lua │ │ ├── hop │ │ │ └── init.lua │ │ ├── indent_blankline │ │ │ └── init.lua │ │ ├── lazy │ │ │ └── init.lua │ │ ├── lspconfig │ │ │ └── init.lua │ │ ├── null_ls │ │ │ └── init.lua │ │ ├── nvim_cmp │ │ │ └── init.lua │ │ ├── nvim_navic │ │ │ └── init.lua │ │ ├── nvim_notify │ │ │ └── init.lua │ │ ├── nvim_scrollview │ │ │ └── init.lua │ │ ├── nvim_tree │ │ │ └── init.lua │ │ ├── nvim_treesitter │ │ │ └── init.lua │ │ ├── nvim_ts_rainbow │ │ │ └── init.lua │ │ ├── nvim_ts_rainbow2 │ │ │ └── init.lua │ │ ├── telescope │ │ │ └── init.lua │ │ ├── vim_illuminate │ │ │ └── init.lua │ │ ├── vim_visual_multi │ │ │ └── init.lua │ │ └── which_key │ │ │ └── init.lua │ ├── hooks │ │ ├── init.lua │ │ └── light_icons.lua │ ├── init.lua │ └── transparent.lua │ ├── extra │ ├── bufferline │ │ └── right.lua │ └── lualine │ │ └── sections.lua │ ├── init.lua │ ├── test │ └── init.lua │ └── utils │ ├── hl.lua │ └── init.lua └── screen ├── dark.png ├── dark01.png ├── dark02.png ├── light.png ├── light01.png └── light02.png /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 |

4 | Neovim Visual Studio Code Theme 5 |

6 | 7 |
8 | A `neovim` theme based on `visual studio code`, written in `Lua`. 9 | It tries to get all the colors in `developer mode` of `vscode`, so the simulation is very high. 10 |
11 | 12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 | 20 | ## Install and use 21 | 22 | Install via `Lazy`: 23 | 24 | ```lua 25 | -- lazy 26 | { 27 | "askfiy/visual_studio_code", 28 | priority = 100, 29 | config = function() 30 | vim.cmd([[colorscheme visual_studio_code]]) 31 | end, 32 | }, 33 | ``` 34 | 35 | Install via `Packer`: 36 | 37 | ```lua 38 | -- packer 39 | { 40 | "askfiy/visual_studio_code", 41 | config = function() 42 | vim.cmd([[colorscheme visual_studio_code]]) 43 | end, 44 | } 45 | ``` 46 | 47 | ## Default configuration 48 | 49 | Default config, modify any option via `setup()`: 50 | 51 | ```lua 52 | require("visual_studio_code").setup({ 53 | -- `dark` or `light` 54 | mode = "dark", 55 | -- Whether to load all color schemes 56 | preset = true, 57 | -- Whether to enable background transparency 58 | transparent = false, 59 | -- Whether to apply the adapted plugin 60 | expands = { 61 | hop = true, 62 | dbui = true, 63 | lazy = true, 64 | aerial = true, 65 | null_ls = true, 66 | nvim_cmp = true, 67 | gitsigns = true, 68 | which_key = true, 69 | nvim_tree = true, 70 | lspconfig = true, 71 | telescope = true, 72 | bufferline = true, 73 | nvim_navic = true, 74 | nvim_notify = true, 75 | vim_illuminate = true, 76 | nvim_treesitter = true, 77 | nvim_ts_rainbow = true, 78 | nvim_scrollview = true, 79 | nvim_ts_rainbow2 = true, 80 | indent_blankline = true, 81 | vim_visual_multi = true, 82 | }, 83 | hooks = { 84 | before = function(conf, colors, utils) end, 85 | after = function(conf, colors, utils) end, 86 | }, 87 | }) 88 | ``` 89 | 90 | ## Related functions 91 | 92 | The plugin provides some utility functions: 93 | 94 | ```lua 95 | require("visual_studio_code") 96 | - get_config() -- current configuration table 97 | - get_colors() -- current color highlight table 98 | - get_lualine_sections() -- lualine sections table 99 | - get_bufferline_right() -- bufferline custom right area 100 | 101 | require("visual_studio_code.utils") 102 | - hl.set(name, options) 103 | - hl.link(src, dst) 104 | - hl.get(name, option) 105 | - hl.bulk_set(groups) 106 | ``` 107 | 108 | Example: 109 | 110 | ```lua 111 | require("visual_studio_code.utils").hl.set("Normal", { fg = "#000000", bg = "#1E1E2E"}) 112 | 113 | require("visual_studio_code.utils").hl.link("NormalFloat", "Normal") 114 | 115 | require("visual_studio_code.utils").hl.get("Normal", "fg") -- #000000 116 | 117 | require("visual_studio_code.utils").hl.bulk_set({ 118 | Normal = { fg = "#000000", bg = "#1E1E2E"}, 119 | NormalFloat = { link = "Normal" }, 120 | Cursor = { bg = "#0FE1EE", bold = true } 121 | }) 122 | ``` 123 | 124 | ## Hooks function 125 | 126 | The plugin provides 2 hook functions, which are automatically executed before and after the color is applied: 127 | 128 | ```lua 129 | hooks = { 130 | before = function(conf, colors, utils) end, 131 | after = function(conf, colors, utils) end, 132 | } 133 | ``` 134 | 135 | ## Additional considerations 136 | 137 | Regarding the `bufferline`, you need to make sure it has the `themable` option turned on: 138 | 139 | ```lua 140 | 141 | require("bufferline").setup({ 142 | options = { 143 | themable = true, 144 | ... 145 | } 146 | }) 147 | ``` 148 | 149 | If you need to use the `vim_visual_multi` plugin adaptation, please add the following code to your `init.lua` file: 150 | 151 | ```lua 152 | vim.g.VM_Extend_hl = "VM_Extend_hl" 153 | vim.g.VM_Cursor_hl = "VM_Cursor_hl" 154 | vim.g.VM_Mono_hl = "VM_Mono_hl" 155 | vim.g.VM_Insert_hl = "VM_Insert_hl" 156 | ``` 157 | 158 | If you don't use `tmux`, try running `:set cmdheight=0`. 159 | 160 | If some `nvim-web-devicons` icons do not display well in `light` mode, please tell me the name of the icon, and I will adapt it. 161 | 162 | ## Lualine integrated 163 | 164 | To quickly get a `vscode` style statusline, you need to use `lualine`: 165 | 166 | ```lua 167 | require("lualine").setup({ 168 | options = { 169 | theme = "visual_studio_code", 170 | icons_enabled = true, 171 | component_separators = { left = "", right = "" }, 172 | section_separators = { left = "", right = "" }, 173 | disabled_filetypes = {}, 174 | globalstatus = true, 175 | refresh = { 176 | statusline = 100, 177 | }, 178 | }, 179 | sections = require("visual_studio_code").get_lualine_sections(), 180 | }) 181 | ``` 182 | 183 | ## Bufferline integrated 184 | 185 | 要快速获取 `vscode` 右上角的几个按钮,你可以向下面这样设置 `bufferline`: 186 | 187 | ```lua 188 | require("bufferline").setup({ 189 | options = { 190 | themable = true, 191 | close_icon = "", 192 | ... 193 | custom_areas = { 194 | right = require("visual_studio_code").get_bufferline_right(), 195 | }, 196 | } 197 | }) 198 | ``` 199 | 200 | ## Extension 201 | 202 | Extended plugin colors are in the `expands` directory. 203 | 204 | [lua/visual_studio_code/core/expands/](./lua/visual_studio_code/core/expands/) 205 | 206 | Also, any new `PR`s are welcome, as I'm not enthusiastic about plugin adaptation, so may need everyone's help to make it better.. 207 | 208 | ## Screenshot 209 | 210 |
211 |
212 | 213 |
214 | 215 |
216 | 217 |
218 | 219 |
220 |
221 | -------------------------------------------------------------------------------- /colors/visual_studio_code.vim: -------------------------------------------------------------------------------- 1 | lua require("visual_studio_code").enter() 2 | -------------------------------------------------------------------------------- /lua/lualine/themes/visual_studio_code.lua: -------------------------------------------------------------------------------- 1 | local colors = {} 2 | 3 | colors.foreground = "#FFFFFF" 4 | colors.background = "#007ACC" 5 | colors.header_background = "#2C896B" 6 | 7 | local component_colors = { 8 | a = { fg = colors.foreground, bg = colors.header_background }, 9 | b = { fg = colors.foreground, bg = colors.background }, 10 | c = { fg = colors.foreground, bg = colors.background }, 11 | 12 | x = { fg = colors.foreground, bg = colors.background }, 13 | y = { fg = colors.foreground, bg = colors.background }, 14 | z = { fg = colors.foreground, bg = colors.background }, 15 | } 16 | 17 | return { 18 | normal = component_colors, 19 | insert = component_colors, 20 | visual = component_colors, 21 | replace = component_colors, 22 | command = component_colors, 23 | inactive = component_colors, 24 | } 25 | -------------------------------------------------------------------------------- /lua/visual_studio_code/colors/dark.lua: -------------------------------------------------------------------------------- 1 | return { 2 | __vscode_foreground = "#CCCCCC", 3 | __vscode_background = "#1E1E1E", 4 | __vscode_local_background = "#252526", 5 | __vscode_visual_color = "#264F78", 6 | __vscode_replace_search_color = "#613214", 7 | __vscode_window_spearator_color = "#454545", 8 | __vscode_extra_decorate_color = "#4FC1FF", 9 | __vscode_inactive_symbol_line_foreground = "#858585", 10 | __vscode_onaction_symbol_line_foreground = "#C6C6C6", 11 | __vscode_onaction_cursor_line_background = "#37373D", 12 | __vscode_fold_background = "#202D39", 13 | __vscode_nontext_foreground = "#3D3E3D", 14 | __vscode_statusline_background = "#007ACC", 15 | __vscode_statusline_foreground = "#FFFFFF", 16 | __vscode_other_word_highlight_background = "#474747", 17 | __vscode_winbar_foreground = "#969696", 18 | __vscode_diff_add_foreground = "#487E02", 19 | __vscode_diff_del_foreground = "#F14C4C", 20 | __vscode_diff_change_foreground = "#1B7CA2", 21 | __vscode_diff_text_foreground = "#9CDCFE", 22 | __vscode_diff_text_background = "#4B592B", 23 | __vscode_todo_foreground = "#1F1F1F", 24 | __vscode_todo_background = "#D9D9D9", 25 | __vscode_variable = "#D4D4D4", 26 | __vscode_keyword = "#569CD6", 27 | __vscode_strings = "#CE9178", 28 | __vscode_comment = "#6A9955", 29 | __vscode_methods = "#DCDCAA", 30 | __vscode_type = "#4EC9B0", 31 | __vscode_file = "#9CDCFE", 32 | __vscode_head = "#C586C0", 33 | __vscode_number = "#B5CEA8", 34 | __vscode_define_foreground = "#B4B4B4", 35 | __vscode_tag_foreground = "#D09E4C", 36 | __vsocode_tag_warpper_foreground = "#808080", 37 | __vscode_typescript_type_foreground = "#B5D4A0", 38 | __vscode_lsp_hint = "#00B7E4", 39 | __vscode_lsp_info = "#3794ff", 40 | __vscode_lsp_warn = "#CCA700", 41 | __vscode_lsp_error = "#F14C4C", 42 | __vscode_inactive_indent_guide_background = "#404040", 43 | __vscode_onactive_indent_guide_background = "#707070", 44 | __vscode_inactive_table_background = "#2D2D2D", 45 | __vscode_inactive_table_foreground = "#969696", 46 | __vscode_onactive_table_background = "#1E1E1E", 47 | __vscode_onactive_table_foreground = "#FFFFFF", 48 | __vscode_local_completion_scrollview_background = "#464647", 49 | __vscode_local_completion_selected_background = "#04395E", 50 | __vscode_global_window_scrollview_background = "#424242", 51 | __vscode_tree_icons_foreground = "#90A4AE", 52 | __vscode_tree_fonts_foreground = "#CCCCCC", 53 | __vscode_git_rename_foreground = "#73C991", 54 | __vscode_git_modified_foreground = "#CCA700", 55 | __vscode_git_added_foreground = "#73C991", 56 | __vscode_git_ignore_foreground = "#8C8C8C", 57 | __vscode_git_stage_modified_foreground = "#E2C08D", 58 | __vscode_git_stage_deleted_foreground = "#C74E39", 59 | __vscode_bracket_level_01_foreground = "#FFD700", 60 | __vscode_bracket_level_02_foreground = "#DA70D6", 61 | __vscode_bracket_level_03_foreground = "#179FFF", 62 | __vscode_unused_color = "#999999", 63 | } 64 | -------------------------------------------------------------------------------- /lua/visual_studio_code/colors/init.lua: -------------------------------------------------------------------------------- 1 | local M = { 2 | dark = require("visual_studio_code.colors.dark"), 3 | light = require("visual_studio_code.colors.light"), 4 | } 5 | 6 | function M.get_colors(mode) 7 | if not vim.tbl_contains(vim.tbl_keys(M), mode) then 8 | return M["dark"] 9 | end 10 | 11 | return M[mode] 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /lua/visual_studio_code/colors/light.lua: -------------------------------------------------------------------------------- 1 | return { 2 | __vscode_foreground = "#616161", 3 | __vscode_background = "#FFFFFF", 4 | __vscode_local_background = "#ECECEC", 5 | __vscode_visual_color = "#ADD6FF", 6 | __vscode_replace_search_color = "#F8C9AB", 7 | __vscode_window_spearator_color = "#D4D4D4", 8 | __vscode_extra_decorate_color = "#0070C1", 9 | __vscode_inactive_symbol_line_foreground = "#237893", 10 | __vscode_onaction_symbol_line_foreground = "#0B216F", 11 | __vscode_onaction_cursor_line_background = "#E4E6F1", 12 | __vscode_fold_background = "#E6F3FF", 13 | __vscode_nontext_foreground = "#D6D6D6", 14 | __vscode_statusline_background = "#007ACC", 15 | __vscode_statusline_foreground = "#FFFFFF", 16 | __vscode_other_word_highlight_background = "#D5D5D5", 17 | __vscode_winbar_foreground = "#676767", 18 | __vscode_diff_add_foreground = "#48985D", 19 | __vscode_diff_del_foreground = "#E51400", 20 | __vscode_diff_change_foreground = "#2090D3", 21 | __vscode_diff_text_foreground = "#2090D3", 22 | __vscode_diff_text_background = "#FFA3A3", 23 | __vscode_todo_foreground = "#FFFFFF", 24 | __vscode_todo_background = "#000000", 25 | __vscode_variable = "#000000", 26 | __vscode_keyword = "#0000FF", 27 | __vscode_strings = "#A31515", 28 | __vscode_comment = "#008000", 29 | __vscode_methods = "#795E26", 30 | __vscode_type = "#267F99", 31 | __vscode_file = "#001080", 32 | __vscode_head = "#AF00DB", 33 | __vscode_number = "#098658", 34 | __vscode_define_foreground = "#AF00DB", 35 | __vscode_tag_foreground = "#0451A5", 36 | __vsocode_tag_warpper_foreground = "#800000", 37 | __vscode_typescript_type_foreground = "#267F99", 38 | __vscode_lsp_hint = "#00B7E4", 39 | __vscode_lsp_info = "#007ACC", 40 | __vscode_lsp_warn = "#B89500", 41 | __vscode_lsp_error = "#BE1100", 42 | __vscode_inactive_indent_guide_background = "#D3D3D3", 43 | __vscode_onactive_indent_guide_background = "#939393", 44 | __vscode_inactive_table_background = "#E3E3E3", 45 | __vscode_inactive_table_foreground = "#464646", 46 | __vscode_onactive_table_background = "#FFFFFF", 47 | __vscode_onactive_table_foreground = "#333333", 48 | __vscode_local_completion_scrollview_background = "#BABABA", 49 | __vscode_local_completion_selected_background = "#0060C0", 50 | __vscode_global_window_scrollview_background = "#C1C1C1", 51 | __vscode_tree_icons_foreground = "#90A4AE", 52 | __vscode_tree_fonts_foreground = "#616161", 53 | __vscode_git_rename_foreground = "#007100", 54 | __vscode_git_modified_foreground = "#895503", 55 | __vscode_git_added_foreground = "#587c0c", 56 | __vscode_git_ignore_foreground = "#8E8E90", 57 | __vscode_git_stage_modified_foreground = "#895503", 58 | __vscode_git_stage_deleted_foreground = "#AD0707", 59 | __vscode_bracket_level_01_foreground = "#0431FA", 60 | __vscode_bracket_level_02_foreground = "#319331", 61 | __vscode_bracket_level_03_foreground = "#7B3814", 62 | __vscode_unused_color = "#808080", 63 | } 64 | -------------------------------------------------------------------------------- /lua/visual_studio_code/config.lua: -------------------------------------------------------------------------------- 1 | local default_config = { 2 | -- `dark` or `light` 3 | mode = "dark", 4 | preset = true, 5 | transparent = false, 6 | expands = { 7 | hop = true, 8 | dbui = true, 9 | lazy = true, 10 | aerial = true, 11 | null_ls = true, 12 | nvim_cmp = true, 13 | gitsigns = true, 14 | which_key = true, 15 | nvim_tree = true, 16 | lspconfig = true, 17 | telescope = true, 18 | bufferline = true, 19 | nvim_navic = true, 20 | nvim_notify = true, 21 | vim_illuminate = true, 22 | nvim_treesitter = true, 23 | nvim_ts_rainbow = true, 24 | nvim_scrollview = true, 25 | nvim_ts_rainbow2 = true, 26 | indent_blankline = true, 27 | vim_visual_multi = true, 28 | }, 29 | hooks = { 30 | ---@diagnostic disable-next-line: unused-local 31 | before = function(conf, colors, utils) end, 32 | ---@diagnostic disable-next-line: unused-local 33 | after = function(conf, colors, utils) end, 34 | }, 35 | } 36 | 37 | return default_config 38 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/basic.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_syntax_highlight(conf, colors) 5 | return { 6 | Comment = { fg = colors.__vscode_comment }, 7 | Constant = { fg = colors.__vscode_number }, 8 | String = { fg = colors.__vscode_strings }, 9 | Character = { link = "String" }, 10 | Number = { fg = colors.__vscode_number }, 11 | Boolean = { fg = colors.__vscode_keyword }, 12 | Float = { link = "Boolean" }, 13 | Identifier = { fg = colors.__vscode_type }, 14 | Function = { fg = colors.__vscode_keyword }, 15 | Statement = { fg = colors.__vscode_keyword }, 16 | Conditional = { fg = colors.__vscode_keyword }, 17 | Repeat = { fg = colors.__vscode_keyword }, 18 | Label = { fg = colors.__vscode_tag_foreground }, 19 | Operator = { fg = colors.__vscode_variable }, 20 | Keyword = { fg = colors.__vscode_keyword }, 21 | Exception = { fg = colors.__vscode_keyword }, 22 | Include = { fg = colors.__vscode_keyword }, 23 | Define = { fg = colors.__vscode_define_foreground }, 24 | Macro = { link = "Define" }, 25 | PreProc = { fg = colors.__vscode_lsp_error }, 26 | PreCondit = { link = "PreProc" }, 27 | Type = { fg = colors.__vscode_type }, 28 | StorageClass = { fg = colors.__vscode_keyword }, 29 | Structure = { fg = colors.__vscode_keyword }, 30 | Typedef = { fg = colors.__vscode_type }, 31 | Special = { fg = colors.__vscode_variable }, 32 | SpecialChar = { link = "Special" }, 33 | Tag = { fg = colors.__vscode_keyword }, 34 | Delimiter = { fg = colors.__vsocode_tag_warpper_foreground }, 35 | SpecialComment = { link = "Comment" }, 36 | Debug = { fg = colors.__vscode_keyword }, 37 | Underlined = { fg = colors.__vscode_number }, 38 | Ignore = { fg = colors.__vscode_nontext_foreground }, 39 | Error = { fg = colors.__vscode_variable }, 40 | Todo = { fg = colors.__vscode_todo_foreground, bg = colors.__vscode_todo_background }, 41 | } 42 | end 43 | 44 | ---@diagnostic disable-next-line: unused-local 45 | function M.get_viml_highlight(conf, colors) 46 | return { 47 | Normal = { fg = colors.__vscode_foreground, bg = colors.__vscode_background }, 48 | NormalFloat = { fg = colors.__vscode_foreground, bg = colors.__vscode_local_background }, 49 | Visual = { bg = colors.__vscode_visual_color }, 50 | MatchParen = { bold = true }, 51 | CursorLine = { bg = colors.__vscode_onaction_cursor_line_background }, 52 | CursorColumn = { link = "CursorLine" }, 53 | ColorColumn = { link = "CursorLine" }, 54 | Folded = { bg = colors.__vscode_fold_background }, 55 | CursorLineNr = { fg = colors.__vscode_onaction_symbol_line_foreground }, 56 | CursorLineSign = { link = "CursorLineNr" }, 57 | CursorLineFold = { link = "CursorLineNr" }, 58 | LineNr = { fg = colors.__vscode_inactive_symbol_line_foreground }, 59 | SignColumn = { link = "LineNr" }, 60 | FoldColumn = { link = "LineNr" }, 61 | MsgArea = { fg = colors.__vscode_variable }, 62 | ModeMsg = { link = "MsgArea" }, 63 | MoreMsg = { fg = colors.__vscode_statusline_background }, 64 | Question = { fg = colors.__vscode_extra_decorate_color, bold = true }, 65 | WarningMsg = { fg = colors.__vscode_lsp_warn }, 66 | ErrorMsg = { fg = colors.__vscode_lsp_error }, 67 | MsgSeparator = { bg = colors.__vscode_local_background }, 68 | QuickFixLine = { link = "ErrorMsg" }, 69 | DiffAdd = { fg = colors.__vscode_diff_add_foreground }, 70 | DiffChange = { fg = colors.__vscode_diff_change_foreground }, 71 | DiffDelete = { fg = colors.__vscode_diff_del_foreground }, 72 | DiffText = { fg = colors.__vscode_diff_text_foreground, bg = colors.__vscode_diff_text_background }, 73 | NonText = { fg = colors.__vscode_nontext_foreground }, 74 | Conceal = { link = "NonText" }, 75 | WinSeparator = { fg = colors.__vscode_window_spearator_color, bold = true }, 76 | Whitespace = { link = "NonText" }, 77 | Menu = { link = "NormalFloat" }, 78 | Pmenu = { link = "NormalFloat" }, 79 | PmenuSel = { bg = colors.__vscode_local_completion_selected_background }, 80 | PmenuSbar = { bg = colors.__vscode_local_background }, 81 | PmenuThumb = { bg = colors.__vscode_local_completion_scrollview_background }, 82 | TabLineFill = { fg = colors.__vscode_foreground, bg = colors.__vscode_local_background }, 83 | TabLine = { fg = colors.__vscode_inactive_table_background, bg = colors.__vscode_local_background }, 84 | TabLineSel = { fg = colors.__vscode_foreground }, 85 | SpellBad = { sp = colors.__vscode_lsp_error, undercurl = true }, 86 | SpellCap = { sp = colors.__vscode_lsp_warn, undercurl = true }, 87 | SpellLocal = { sp = colors.__vscode_lsp_info, undercurl = true }, 88 | SpellRare = { sp = colors.__vscode_head, undercurl = true }, 89 | Search = { bg = colors.__vscode_replace_search_color }, 90 | CurSearch = { bg = colors.__vscode_replace_search_color }, 91 | IncSearch = { bg = colors.__vscode_replace_search_color }, 92 | Substitute = { bg = colors.__vscode_replace_search_color, bold = true }, 93 | Directory = { fg = colors.__vscode_extra_decorate_color, bg = colors.__vscode_local_background, bold = true }, 94 | Title = { fg = colors.__vscode_extra_decorate_color, bold = true }, 95 | WinBar = { fg = colors.__vscode_variable }, 96 | Scrollbar = { bg = colors.__vscode_local_completion_scrollview_background }, 97 | StatusLine = { fg = colors.__vscode_statusline_foreground, bg = colors.__vscode_statusline_background }, 98 | StatusLineNC = { bg = colors.__vscode_statusline_background }, 99 | SpecialKey = { fg = colors.__vscode_extra_decorate_color }, 100 | FloatBorder = { fg = colors.__vscode_window_spearator_color }, 101 | FloatTitle = { fg = colors.__vscode_extra_decorate_color}, 102 | FloatFooter = { fg = colors.__vscode_extra_decorate_color} 103 | -- FloatShadowThrough = {}, 104 | -- FloatShadow = {}, 105 | } 106 | end 107 | 108 | ---@diagnostic disable-next-line: unused-local 109 | function M.get_highlight(conf, colors) 110 | return vim.tbl_deep_extend("force", M.get_viml_highlight(conf, colors), M.get_syntax_highlight(conf, colors)) 111 | end 112 | 113 | --- init terminal color --- 114 | vim.g.terminal_color_0 = "#6E6C7E" 115 | vim.g.terminal_color_1 = "#F28FAD" 116 | vim.g.terminal_color_2 = "#ABE9B3" 117 | vim.g.terminal_color_3 = "#FAE3B0" 118 | vim.g.terminal_color_4 = "#96CDFB" 119 | vim.g.terminal_color_5 = "#F5C2E7" 120 | vim.g.terminal_color_6 = "#89DCEB" 121 | vim.g.terminal_color_7 = "#D9E0EE" 122 | vim.g.terminal_color_8 = "#988BA2" 123 | vim.g.terminal_color_9 = "#F28FAD" 124 | vim.g.terminal_color_10 = "#ABE9B3" 125 | vim.g.terminal_color_11 = "#FAE3B0" 126 | vim.g.terminal_color_12 = "#96CDFB" 127 | vim.g.terminal_color_13 = "#F5C2E7" 128 | vim.g.terminal_color_14 = "#89DCEB" 129 | vim.g.terminal_color_15 = "#D9E0EE" 130 | 131 | return M 132 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/aerial/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | AerialLine = { bg = colors.__vscode_onaction_cursor_line_background }, 7 | AerialLineNC = { bg = colors.__vscode_onaction_cursor_line_background }, 8 | AerialGuide = { fg = colors.__vscode_extra_decorate_color }, 9 | AerialArray = { fg = colors.__vscode_foreground }, 10 | AerialBoolean = { fg = colors.__vscode_foreground }, 11 | AerialClass = { fg = colors.__vscode_foreground }, 12 | AerialConstant = { fg = colors.__vscode_foreground }, 13 | AerialConstructor = { fg = colors.__vscode_foreground }, 14 | AerialEnum = { fg = colors.__vscode_foreground }, 15 | AerialEnumMember = { fg = colors.__vscode_foreground }, 16 | AerialEvent = { fg = colors.__vscode_foreground }, 17 | AerialField = { fg = colors.__vscode_foreground }, 18 | AerialFile = { fg = colors.__vscode_foreground }, 19 | AerialFunction = { fg = colors.__vscode_foreground }, 20 | AerialInterface = { fg = colors.__vscode_foreground }, 21 | AerialKey = { fg = colors.__vscode_foreground }, 22 | AerialMethod = { fg = colors.__vscode_foreground }, 23 | AerialModule = { fg = colors.__vscode_foreground }, 24 | AerialNamespace = { fg = colors.__vscode_foreground }, 25 | AerialNull = { fg = colors.__vscode_foreground }, 26 | AerialNumber = { fg = colors.__vscode_foreground }, 27 | AerialObject = { fg = colors.__vscode_foreground }, 28 | AerialOperator = { fg = colors.__vscode_foreground }, 29 | AerialPackage = { fg = colors.__vscode_foreground }, 30 | AerialProperty = { fg = colors.__vscode_foreground }, 31 | AerialString = { fg = colors.__vscode_foreground }, 32 | AerialStruct = { fg = colors.__vscode_foreground }, 33 | AerialTypeParameter = { fg = colors.__vscode_foreground }, 34 | AerialVariable = { fg = colors.__vscode_foreground }, 35 | AerialArrayIcon = { fg = colors.__vscode_extra_decorate_color }, 36 | AerialBooleanIcon = { fg = colors.__vscode_extra_decorate_color }, 37 | AerialClassIcon = { fg = colors.__vscode_extra_decorate_color }, 38 | AerialConstantIcon = { fg = colors.__vscode_extra_decorate_color }, 39 | AerialConstructorIcon = { fg = colors.__vscode_extra_decorate_color }, 40 | AerialEnumIcon = { fg = colors.__vscode_extra_decorate_color }, 41 | AerialEnumMemberIcon = { fg = colors.__vscode_extra_decorate_color }, 42 | AerialEventIcon = { fg = colors.__vscode_extra_decorate_color }, 43 | AerialFieldIcon = { fg = colors.__vscode_extra_decorate_color }, 44 | AerialFileIcon = { fg = colors.__vscode_extra_decorate_color }, 45 | AerialFunctionIcon = { fg = colors.__vscode_extra_decorate_color }, 46 | AerialInterfaceIcon = { fg = colors.__vscode_extra_decorate_color }, 47 | AerialKeyIcon = { fg = colors.__vscode_extra_decorate_color }, 48 | AerialMethodIcon = { fg = colors.__vscode_extra_decorate_color }, 49 | AerialModuleIcon = { fg = colors.__vscode_extra_decorate_color }, 50 | AerialNamespaceIcon = { fg = colors.__vscode_extra_decorate_color }, 51 | AerialNullIcon = { fg = colors.__vscode_extra_decorate_color }, 52 | AerialNumberIcon = { fg = colors.__vscode_extra_decorate_color }, 53 | AerialObjectIcon = { fg = colors.__vscode_extra_decorate_color }, 54 | AerialOperatorIcon = { fg = colors.__vscode_extra_decorate_color }, 55 | AerialPackageIcon = { fg = colors.__vscode_extra_decorate_color }, 56 | AerialPropertyIcon = { fg = colors.__vscode_extra_decorate_color }, 57 | AerialStringIcon = { fg = colors.__vscode_extra_decorate_color }, 58 | AerialStructIcon = { fg = colors.__vscode_extra_decorate_color }, 59 | AerialTypeParameterIcon = { fg = colors.__vscode_extra_decorate_color }, 60 | AerialVariableIcon = { fg = colors.__vscode_extra_decorate_color }, 61 | } 62 | end 63 | 64 | return M 65 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/bufferline/filetype_icons.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "http", 3 | "Pyd", 4 | "Yaml", 5 | "GitConfig", 6 | "Doc", 7 | "Crystal", 8 | "Verilog", 9 | "CMake", 10 | "Sql", 11 | "ClojureJS", 12 | "ClojureC", 13 | "Json5", 14 | "Cson", 15 | "Suo", 16 | "Zshprofile", 17 | "Db", 18 | "Haml", 19 | "Csv", 20 | "Scheme", 21 | "Jsx", 22 | "Erl", 23 | "Bash", 24 | "Prisma", 25 | "Tsx", 26 | "Drools", 27 | "Ml", 28 | "GitLogo", 29 | "Cobol", 30 | "Rmd", 31 | "Sig", 32 | "Less", 33 | "Epp", 34 | "Zsh", 35 | "Bat", 36 | "DesktopEntry", 37 | "Py", 38 | "Pyi", 39 | "Default", 40 | "Clojure", 41 | "Fsharp", 42 | "Rss", 43 | "Sln", 44 | "Favicon", 45 | "Js", 46 | "Tcl", 47 | "Styl", 48 | "Ejs", 49 | "Edn", 50 | "Jpeg", 51 | "SystemVerilog", 52 | "Fsi", 53 | "Hxx", 54 | "Fsscript", 55 | "Slim", 56 | "Terraform", 57 | "Html", 58 | "Ksh", 59 | "Svg", 60 | "Gif", 61 | "TFVars", 62 | "Pdf", 63 | "GDScript", 64 | "Cpp", 65 | "BinaryGLTF", 66 | "Tor", 67 | "Gemspec", 68 | "Mustache", 69 | "Fs", 70 | "Csh", 71 | "Ex", 72 | "GodotProject", 73 | "Cxx", 74 | "Sml", 75 | "Dockerfile", 76 | "Elm", 77 | "PackedResource", 78 | "Gruntfile", 79 | "Dropbox", 80 | "R", 81 | "Webp", 82 | "Twig", 83 | "Webpack", 84 | "GitIgnore", 85 | "Mli", 86 | "XcPlayground", 87 | "Awk", 88 | "Xls", 89 | "Bashrc", 90 | "sbt", 91 | "NodeModules", 92 | "D", 93 | "Png", 94 | "Erb", 95 | "Exs", 96 | "Cp", 97 | "Pl", 98 | "Scss", 99 | "Makefile", 100 | "GraphQL", 101 | "BashProfile", 102 | "Md", 103 | "Rs", 104 | "Htm", 105 | "Ini", 106 | "Vimrc", 107 | "Ico", 108 | "Mdx", 109 | "ImportConfiguration", 110 | "Lock", 111 | "Fish", 112 | "Hpp", 113 | "Sass", 114 | "Php", 115 | "Diff", 116 | "CPlusPlus", 117 | "Java", 118 | "DsStore", 119 | "Zig", 120 | "MixLock", 121 | "GitAttributes", 122 | "Xul", 123 | "Mjs", 124 | "Markdown", 125 | "Mint", 126 | "GitlabCI", 127 | "Css", 128 | "VHDL", 129 | "Coffee", 130 | "ClojureDart", 131 | "Json", 132 | "Jsonc", 133 | "Vim", 134 | "Fennel", 135 | "Zshrc", 136 | "Rb", 137 | "Pp", 138 | "Gvimrc", 139 | "NPMrc", 140 | "Vue", 141 | "SettingsJson", 142 | "C", 143 | "Nim", 144 | "TextResource", 145 | "TextScene", 146 | "Solidity", 147 | "Lua", 148 | "Babelrc", 149 | "Brewfile", 150 | "Cs", 151 | "Yml", 152 | "Jpg", 153 | "CMakeLists", 154 | "GitModules", 155 | "OpenTypeFont", 156 | "Query", 157 | "GitCommit", 158 | "Motoko", 159 | "License", 160 | "Zshenv", 161 | "Dump", 162 | "OPUS", 163 | "Material", 164 | "Gemfile", 165 | "Rake", 166 | "Webmanifest", 167 | "Hh", 168 | "Pm", 169 | "Prolog", 170 | "Nix", 171 | "Dart", 172 | "Vagrantfile", 173 | "Eex", 174 | "ConfigRu", 175 | "Heex", 176 | "Txt", 177 | "Rakefile", 178 | "Fsx", 179 | "Log", 180 | "Jl", 181 | "Leex", 182 | "Xml", 183 | "Hbs", 184 | "PackageLockJson", 185 | "Ai", 186 | "Env", 187 | "Swift", 188 | "Terminal", 189 | "Hrl", 190 | "Configuration", 191 | "Kotlin", 192 | "KotlinScript", 193 | "Bmp", 194 | "NPMIgnore", 195 | "Scala", 196 | "Pyo", 197 | "Ppt", 198 | "Gulpfile", 199 | "Toml", 200 | "Conf", 201 | "Tex", 202 | "Rlib", 203 | "Procfile", 204 | "Ts", 205 | "TypeScript", 206 | "PromptPs1", 207 | "Rproj", 208 | "Psb", 209 | "Svelte", 210 | "Luau", 211 | "Psd", 212 | "Go", 213 | "Lhs", 214 | "PackageJson", 215 | "packagejson", 216 | "tsconfig", 217 | "Hs", 218 | "H", 219 | "Pyc", 220 | "Sh", 221 | } 222 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/bufferline/init.lua: -------------------------------------------------------------------------------- 1 | local filetype_icons = require("visual_studio_code.core.expands.bufferline.filetype_icons") 2 | 3 | local M = {} 4 | 5 | function M.get_highlight(conf, colors) 6 | return vim.tbl_deep_extend("force", { 7 | BufferLineFill = { 8 | bg = colors.__vscode_local_background, 9 | }, 10 | BufferLineTruncMarker = { 11 | fg = colors.__vscode_inactive_table_foreground, 12 | bg = colors.__vscode_onactive_table_background , 13 | }, 14 | BufferLineBufferSelected = { 15 | fg = colors.__vscode_onactive_table_foreground, 16 | bg = colors.__vscode_onactive_table_background, 17 | }, 18 | BufferLineBackground = { 19 | fg = colors.__vscode_inactive_table_foreground, 20 | bg = colors.__vscode_inactive_table_background, 21 | }, 22 | BufferLineBufferVisible = { 23 | fg = colors.__vscode_inactive_table_foreground, 24 | bg = colors.__vscode_inactive_table_background, 25 | }, 26 | BufferLineIndicatorSelected = { 27 | fg = colors.__vscode_inactive_table_foreground, 28 | bg = colors.__vscode_onactive_table_background, 29 | }, 30 | BufferLineIndicator = { 31 | fg = colors.__vscode_inactive_table_foreground, 32 | bg = colors.__vscode_inactive_table_background, 33 | }, 34 | BufferLineIndicatorVisible = { 35 | fg = colors.__vscode_inactive_table_foreground, 36 | bg = colors.__vscode_inactive_table_background, 37 | }, 38 | BufferLineSeparatorSelected = { 39 | fg = colors.__vscode_onactive_table_background, 40 | bg = colors.__vscode_onactive_table_background, 41 | }, 42 | BufferLineSeparator = { 43 | fg = colors.__vscode_onactive_table_background, 44 | bg = colors.__vscode_inactive_table_background, 45 | }, 46 | BufferLineSeparatorVisible = { 47 | fg = colors.__vscode_onactive_table_background, 48 | bg = colors.__vscode_inactive_table_background, 49 | }, 50 | BufferLineCloseButtonSelected = { 51 | fg = colors.__vscode_onactive_table_foreground, 52 | bg = colors.__vscode_onactive_table_background, 53 | }, 54 | BufferLineCloseButton = { 55 | fg = colors.__vscode_inactive_table_foreground, 56 | bg = colors.__vscode_inactive_table_background, 57 | }, 58 | BufferLineCloseButtonVisible = { 59 | fg = colors.__vscode_inactive_table_foreground, 60 | bg = colors.__vscode_inactive_table_background, 61 | }, 62 | BufferLineModifiedSelected = { 63 | fg = colors.__vscode_onactive_table_foreground, 64 | bg = colors.__vscode_onactive_table_background, 65 | }, 66 | BufferLineModified = { 67 | fg = colors.__vscode_inactive_table_foreground, 68 | bg = colors.__vscode_inactive_table_background, 69 | }, 70 | BufferLineModifiedVisible = { 71 | fg = colors.__vscode_inactive_table_foreground, 72 | bg = colors.__vscode_inactive_table_background, 73 | }, 74 | BufferLineNumbersSelected = { 75 | fg = colors.__vscode_onactive_table_foreground, 76 | bg = colors.__vscode_onactive_table_background, 77 | }, 78 | BufferLineNumbers = { 79 | fg = colors.__vscode_inactive_table_foreground, 80 | bg = colors.__vscode_inactive_table_background, 81 | }, 82 | BufferLineNumbersVisible = { 83 | fg = colors.__vscode_inactive_table_foreground, 84 | bg = colors.__vscode_inactive_table_background, 85 | }, 86 | BufferLinePickSelected = { 87 | fg = colors.__vscode_lsp_error, 88 | bg = colors.__vscode_onactive_table_background, 89 | bold = true, 90 | }, 91 | BufferLinePick = { 92 | fg = colors.__vscode_lsp_error, 93 | bg = colors.__vscode_inactive_table_background, 94 | bold = true, 95 | }, 96 | BufferLinePickVisible = { 97 | fg = colors.__vscode_lsp_error, 98 | bg = colors.__vscode_inactive_table_background, 99 | bold = true, 100 | }, 101 | BufferLineTabSelected = { 102 | fg = colors.__vscode_onactive_table_foreground, 103 | bg = colors.__vscode_local_background, 104 | }, 105 | 106 | BufferLineTab = { 107 | fg = colors.__vscode_inactive_table_foreground, 108 | bg = colors.__vscode_local_background, 109 | }, 110 | 111 | BufferLineTabSeparatorSelected = { 112 | fg = colors.__vscode_local_background, 113 | bg = colors.__vscode_local_background, 114 | }, 115 | 116 | BufferLineTabSeparator = { 117 | fg = colors.__vscode_local_background, 118 | bg = colors.__vscode_local_background, 119 | }, 120 | 121 | BufferLineTabClose = { 122 | bg = colors.__vscode_local_background, 123 | fg = colors.__vscode_lsp_error, 124 | bold = true, 125 | }, 126 | 127 | BufferlineDuplicateSelected = { 128 | fg = colors.__vscode_onactive_table_foreground, 129 | bg = colors.__vscode_onactive_table_background, 130 | }, 131 | BufferlineDuplicate = { 132 | fg = colors.__vscode_inactive_table_foreground, 133 | bg = colors.__vscode_inactive_table_background, 134 | }, 135 | BufferlineDuplicateVisible = { 136 | fg = colors.__vscode_inactive_table_foreground, 137 | bg = colors.__vscode_inactive_table_background, 138 | }, 139 | 140 | BufferLineHintSelected = { 141 | fg = colors.__vscode_lsp_hint, 142 | bg = colors.__vscode_onactive_table_background, 143 | }, 144 | BufferLineHint = { 145 | fg = colors.__vscode_inactive_table_foreground, 146 | bg = colors.__vscode_inactive_table_background, 147 | }, 148 | BufferLineHintVisible = { 149 | fg = colors.__vscode_inactive_table_foreground, 150 | bg = colors.__vscode_inactive_table_background, 151 | }, 152 | 153 | BufferLineInfoSelected = { 154 | fg = colors.__vscode_lsp_info, 155 | bg = colors.__vscode_onactive_table_background, 156 | }, 157 | BufferLineInfo = { 158 | fg = colors.__vscode_inactive_table_foreground, 159 | bg = colors.__vscode_inactive_table_background, 160 | }, 161 | BufferLineInfoVisible = { 162 | fg = colors.__vscode_inactive_table_foreground, 163 | bg = colors.__vscode_inactive_table_background, 164 | }, 165 | 166 | BufferLineWarningSelected = { 167 | fg = colors.__vscode_lsp_warn, 168 | bg = colors.__vscode_onactive_table_background, 169 | }, 170 | BufferLineWarning = { 171 | fg = colors.__vscode_inactive_table_foreground, 172 | bg = colors.__vscode_inactive_table_background, 173 | }, 174 | BufferLineWarningVisible = { 175 | fg = colors.__vscode_inactive_table_foreground, 176 | bg = colors.__vscode_inactive_table_background, 177 | }, 178 | 179 | BufferLineErrorSelected = { 180 | fg = colors.__vscode_lsp_error, 181 | bg = colors.__vscode_onactive_table_background, 182 | }, 183 | BufferLineError = { 184 | fg = colors.__vscode_inactive_table_foreground, 185 | bg = colors.__vscode_inactive_table_background, 186 | }, 187 | BufferLineErrorVisible = { 188 | fg = colors.__vscode_inactive_table_foreground, 189 | bg = colors.__vscode_inactive_table_background, 190 | }, 191 | 192 | BufferLineHintDiagnosticSelected = { 193 | fg = colors.__vscode_lsp_hint, 194 | bg = colors.__vscode_onactive_table_background, 195 | }, 196 | BufferLineHintDiagnostic = { 197 | fg = colors.__vscode_inactive_table_foreground, 198 | bg = colors.__vscode_inactive_table_background, 199 | }, 200 | BufferLineHintDiagnosticVisible = { 201 | fg = colors.__vscode_inactive_table_foreground, 202 | bg = colors.__vscode_inactive_table_background, 203 | }, 204 | 205 | BufferLineInfoDiagnosticSelected = { 206 | fg = colors.__vscode_lsp_info, 207 | bg = colors.__vscode_onactive_table_background, 208 | }, 209 | BufferLineInfoDiagnostic = { 210 | fg = colors.__vscode_inactive_table_foreground, 211 | bg = colors.__vscode_inactive_table_background, 212 | }, 213 | BufferLineInfoDiagnosticVisible = { 214 | fg = colors.__vscode_inactive_table_foreground, 215 | bg = colors.__vscode_inactive_table_background, 216 | }, 217 | 218 | BufferLineWarningDiagnosticSelected = { 219 | fg = colors.__vscode_lsp_warn, 220 | bg = colors.__vscode_onactive_table_background, 221 | }, 222 | BufferLineWarningDiagnostic = { 223 | fg = colors.__vscode_inactive_table_foreground, 224 | bg = colors.__vscode_inactive_table_background, 225 | }, 226 | BufferLineWarningDiagnosticVisible = { 227 | fg = colors.__vscode_inactive_table_foreground, 228 | bg = colors.__vscode_inactive_table_background, 229 | }, 230 | 231 | BufferLineErrorDiagnosticSelected = { 232 | fg = colors.__vscode_lsp_error, 233 | bg = colors.__vscode_onactive_table_background, 234 | }, 235 | BufferLineErrorDiagnostic = { 236 | fg = colors.__vscode_inactive_table_foreground, 237 | bg = colors.__vscode_inactive_table_background, 238 | }, 239 | BufferLineErrorDiagnosticVisible = { 240 | fg = colors.__vscode_inactive_table_foreground, 241 | bg = colors.__vscode_inactive_table_background, 242 | }, 243 | }, M.get_fileicons_highlights(conf, colors)) 244 | end 245 | 246 | ---@diagnostic disable-next-line: unused-local 247 | ---@diagnostic disable-next-line: unused-local 248 | function M.get_fileicons_highlights(conf, colors) 249 | local ok, module = pcall(require, "nvim-web-devicons") 250 | local hl_groups = {} 251 | 252 | if ok then 253 | table.insert(filetype_icons, "Default") 254 | 255 | for _, name in ipairs(filetype_icons) do 256 | ---@diagnostic disable-next-line: undefined-field 257 | local icon_name = name:lower() 258 | 259 | local _, fg = module.get_icon_color(icon_name) 260 | fg = fg or colors.__vscode_onactive_table_foreground 261 | 262 | hl_groups[string.format("BufferlineDevIcon%s", name)] = 263 | { fg = colors.__vscode_inactive_table_foreground, bg = colors.__vscode_inactive_table_background } 264 | hl_groups[string.format("BufferlineDevIcon%sInactive", name)] = 265 | { fg = colors.__vscode_inactive_table_foreground, bg = colors.__vscode_inactive_table_background } 266 | 267 | hl_groups[string.format("BufferlineDevIcon%sSelected", name)] = 268 | { fg = fg, bg = colors.__vscode_onactive_table_background } 269 | end 270 | end 271 | 272 | return hl_groups 273 | end 274 | return M 275 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/dbui/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | dbui_collapsed_tables = { link = "Normal" }, 7 | dbui_expanded_tables = { link = "Normal" }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/gitsigns/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | GitSignsCurrentLineBlame = { fg = colors.__vscode_inactive_table_foreground }, 7 | GitSignsAdd = { fg = colors.__vscode_git_added_foreground }, 8 | GitSignsAddLn = { link = "GitSignsAdd" }, 9 | GitSignsAddNr = { link = "GitSignsAdd" }, 10 | GitSignsChange = { fg = colors.__vscode_git_modified_foreground }, 11 | GitSignsChangeLn = { link = "GitSignsChange" }, 12 | GitSignsChangeNr = { link = "GitSignsChange" }, 13 | GitSignsChangeDelete = { fg = colors.__vscode_git_modified_foreground }, 14 | GitSignsChangeDeleteLn = { link = "GitSignsChange" }, 15 | GitSignsChangeDeleteNr = { link = "GitSignsChange" }, 16 | GitSignsDelete = { fg = colors.__vscode_git_stage_deleted_foreground }, 17 | GitSignsDeleteLn = { link = "GitSignsDelete" }, 18 | GitSignsDeleteNr = { link = "GitSignsDelete" }, 19 | GitSignsTopdelete = { fg = colors.__vscode_git_stage_deleted_foreground }, 20 | GitSignsTopdeleteLn = { link = "GitSignsDelete" }, 21 | GitSignsTopdeleteNr = { link = "GitSignsDelete" }, 22 | GitSignsAddInline = { fg = colors.__vscode_git_added_foreground }, 23 | GitSignsDeleteInline = { fg = colors.__vscode_git_modified_foreground }, 24 | GitSignsChangeInline = { fg = colors.__vscode_git_stage_deleted_foreground }, 25 | 26 | } 27 | end 28 | 29 | return M 30 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/hop/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | HopNextKey = { fg = colors.__vscode_bracket_level_01_foreground, bold = true }, 7 | HopNextKey1 = { fg = colors.__vscode_bracket_level_02_foreground, bold = true }, 8 | HopNextKey2 = { fg = colors.__vscode_diff_text_foreground, bold = true, italic = true }, 9 | HopUnmatched = { fg = colors.__vscode_inactive_table_foreground }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/indent_blankline/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | IndentBlanklineChar = { fg = colors.__vscode_inactive_indent_guide_background}, 7 | IndentBlanklineContextChar = { fg = colors.__vscode_onactive_indent_guide_background }, 8 | } 9 | end 10 | 11 | return M 12 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/lazy/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | LazyH1 = { fg = colors.__vscode_onactive_table_foreground, bg = colors.__vscode_visual_color }, 7 | LazyButton = { fg = colors.__vscode_foreground, bg = colors.__vscode_onaction_cursor_line_background }, 8 | LazySpecial = { fg = colors.__vscode_foreground }, 9 | LazyButtonActive = { fg = colors.__vscode_onactive_table_foreground, bg = colors.__vscode_visual_color }, 10 | LazyReasonInit = { fg = colors.__vscode_extra_decorate_color }, 11 | LazyH2 = { fg = colors.__vscode_extra_decorate_color }, 12 | LazyProp = { fg = colors.__vscode_methods }, 13 | LazyReasonCmd = { fg = colors.__vscode_head }, 14 | LazyReasonEvent = { fg = colors.__vscode_head }, 15 | LazyReasonFt = { fg = colors.__vscode_head }, 16 | LazyReasonKeys = { fg = colors.__vscode_extra_decorate_color }, 17 | LazyReasonPlugin = { fg = colors.__vscode_methods }, 18 | LazyReasonRuntime = { fg = colors.__vscode_type }, 19 | LazyReasonSource = { fg = colors.__vscode_strings }, 20 | LazyReasonStart = { fg = colors.__vscode_file }, 21 | } 22 | end 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/lspconfig/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | DiagnosticError = { fg = colors.__vscode_lsp_error }, 7 | DiagnosticWarn = { fg = colors.__vscode_lsp_warn }, 8 | DiagnosticInfo = { fg = colors.__vscode_lsp_info }, 9 | DiagnosticHint = { fg = colors.__vscode_lsp_hint }, 10 | DiagnosticSignError = { fg = colors.__vscode_lsp_error }, 11 | DiagnosticSignWarn = { fg = colors.__vscode_lsp_warn }, 12 | DiagnosticSignInformation = { fg = colors.__vscode_lsp_info }, 13 | DiagnosticSignHint = { fg = colors.__vscode_lsp_hint }, 14 | DiagnosticFloatingError = { fg = colors.__vscode_lsp_error }, 15 | DiagnosticFloatingWarn = { fg = colors.__vscode_lsp_warn }, 16 | DiagnosticFloatingInformation = { fg = colors.__vscode_lsp_info }, 17 | DiagnosticFloatingHint = { fg = colors.__vscode_lsp_hint }, 18 | DiagnosticVirtualTextError = { fg = colors.__vscode_lsp_error }, 19 | DiagnosticVirtualTextWarn = { fg = colors.__vscode_lsp_warn }, 20 | DiagnosticVirtualTextInformation = { fg = colors.__vscode_lsp_info }, 21 | DiagnosticVirtualTextHint = { fg = colors.__vscode_lsp_hint }, 22 | DiagnosticUnderlineError = { undercurl = true, sp = colors.__vscode_lsp_error }, 23 | DiagnosticUnderlineWarn = { undercurl = true, sp = colors.__vscode_lsp_warn }, 24 | DiagnosticUnderlineInformation = { undercurl = true, sp = colors.__vscode_lsp_info }, 25 | DiagnosticUnderlineHint = { undercurl = true, sp = colors.__vscode_lsp_hint }, 26 | DiagnosticUnnecessary = { fg = colors.__vscode_unused_color }, 27 | LspInfoBorder = { fg = colors.__vscode_window_spearator_color, bold = true }, 28 | LspSignatureActiveParameter = { fg = colors.__vscode_extra_decorate_color, bold = true }, 29 | LspInlayHint = { fg = colors.__vscode_inactive_table_foreground }, 30 | } 31 | end 32 | 33 | return M 34 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/null_ls/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | NullLsInfoBorder = { link = "FloatBorder" }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_cmp/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | CmpItemAbbr = { fg = colors.__vscode_onactive_table_foreground }, 7 | CmpItemKind = { fg = colors.__vscode_onactive_table_foreground }, 8 | CmpItemMenu = { fg = colors.__vscode_onactive_table_foreground }, 9 | CmpItemAbbrMatch = { fg = colors.__vscode_keyword, bold = true }, 10 | CmpItemAbbrMatchFuzzy = { fg = colors.__vscode_keyword }, 11 | CmpItemAbbrDeprecated = { fg = colors.__vsocode_tag_warpper_foreground, strikethrough = true }, 12 | CmpItemKindVariable = { fg = colors.__vscode_type }, 13 | CmpItemKindText = { fg = colors.__vscode_type }, 14 | CmpItemKindKeyword = { fg = colors.__vscode_file }, 15 | CmpItemKindConstructor = { fg = colors.__vscode_file }, 16 | CmpItemKindUnit = { fg = colors.__vscode_file }, 17 | CmpItemKindFunction = { fg = colors.__vscode_file }, 18 | CmpItemKindMethod = { fg = colors.__vscode_file }, 19 | CmpItemKindConstant = { fg = colors.__vscode_file }, 20 | CmpItemKindStruct = { fg = colors.__vscode_tag_foreground }, 21 | CmpItemKindInterface = { fg = colors.__vscode_tag_foreground }, 22 | CmpItemKindClass = { fg = colors.__vscode_tag_foreground }, 23 | CmpItemKindField = { fg = colors.__vscode_tag_foreground }, 24 | CmpItemKindProperty = { fg = colors.__vscode_tag_foreground }, 25 | CmpItemKindEnum = { fg = colors.__vscode_tag_foreground }, 26 | CmpItemKindEnumMember = { fg = colors.__vscode_tag_foreground }, 27 | CmpItemKindFile = { fg = colors.__vscode_head }, 28 | CmpItemKindSnippet = { fg = colors.__vscode_head }, 29 | CmpItemKindFolder = { fg = colors.__vscode_head }, 30 | CmpItemKindModule = { fg = colors.__vscode_head }, 31 | CmpItemKindColor = { fg = colors.__vscode_number }, 32 | CmpItemKindReference = { fg = colors.__vscode_number }, 33 | CmpItemKindValue = { fg = colors.__vscode_number }, 34 | CmpItemKindEvent = { fg = colors.__vscode_number }, 35 | CmpItemKindOperator = { fg = colors.__vscode_number }, 36 | CmpItemKindTypeParameter = { fg = colors.__vscode_number }, 37 | } 38 | end 39 | 40 | return M 41 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_navic/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | NavicText = { fg = colors.__vscode_winbar_foreground }, 7 | NavicSeparator = { fg = colors.__vscode_winbar_foreground }, 8 | NavicIconsFile = { fg = colors.__vscode_winbar_foreground }, 9 | NavicIconsModule = { fg = colors.__vscode_winbar_foreground }, 10 | NavicIconsNamespace = { fg = colors.__vscode_winbar_foreground }, 11 | NavicIconsPackage = { fg = colors.__vscode_winbar_foreground }, 12 | NavicIconsClass = { fg = colors.__vscode_winbar_foreground }, 13 | NavicIconsMethod = { fg = colors.__vscode_winbar_foreground }, 14 | NavicIconsProperty = { fg = colors.__vscode_winbar_foreground }, 15 | NavicIconsField = { fg = colors.__vscode_winbar_foreground }, 16 | NavicIconsConstructor = { fg = colors.__vscode_winbar_foreground }, 17 | NavicIconsEnum = { fg = colors.__vscode_winbar_foreground }, 18 | NavicIconsInterface = { fg = colors.__vscode_winbar_foreground }, 19 | NavicIconsFunction = { fg = colors.__vscode_winbar_foreground }, 20 | NavicIconsVariable = { fg = colors.__vscode_winbar_foreground }, 21 | NavicIconsConstant = { fg = colors.__vscode_winbar_foreground }, 22 | NavicIconsString = { fg = colors.__vscode_winbar_foreground }, 23 | NavicIconsNumber = { fg = colors.__vscode_winbar_foreground }, 24 | NavicIconsBoolean = { fg = colors.__vscode_winbar_foreground }, 25 | NavicIconsArray = { fg = colors.__vscode_winbar_foreground }, 26 | NavicIconsObject = { fg = colors.__vscode_winbar_foreground }, 27 | NavicIconsKey = { fg = colors.__vscode_winbar_foreground }, 28 | NavicIconsNull = { fg = colors.__vscode_winbar_foreground }, 29 | NavicIconsEnumMember = { fg = colors.__vscode_winbar_foreground }, 30 | NavicIconsStruct = { fg = colors.__vscode_winbar_foreground }, 31 | NavicIconsEvent = { fg = colors.__vscode_winbar_foreground }, 32 | NavicIconsOperator = { fg = colors.__vscode_winbar_foreground }, 33 | NavicIconsTypeParameter = { fg = colors.__vscode_winbar_foreground }, 34 | } 35 | end 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_notify/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | NotifyERRORBorder = { fg = colors.__vscode_lsp_error }, 7 | NotifyERRORIcon = { fg = colors.__vscode_lsp_error }, 8 | NotifyERRORTitle = { fg = colors.__vscode_lsp_error, italic = true }, 9 | NotifyWARNBorder = { fg = colors.__vscode_lsp_warn }, 10 | NotifyWARNIcon = { fg = colors.__vscode_lsp_warn }, 11 | NotifyWARNTitle = { fg = colors.__vscode_lsp_warn, italic = true }, 12 | NotifyINFOBorder = { fg = colors.__vscode_lsp_info }, 13 | NotifyINFOIcon = { fg = colors.__vscode_lsp_info }, 14 | NotifyINFOTitle = { fg = colors.__vscode_lsp_info, italic = true }, 15 | NotifyDEBUGBorder = { fg = colors.__vscode_extra_decorate_color }, 16 | NotifyDEBUGIcon = { fg = colors.__vscode_extra_decorate_color }, 17 | NotifyDEBUGTitle = { fg = colors.__vscode_extra_decorate_color, italic = true }, 18 | NotifyTRACEBorder = { fg = colors.__vscode_methods }, 19 | NotifyTRACEIcon = { fg = colors.__vscode_methods }, 20 | NotifyTRACETitle = { fg = colors.__vscode_methods, italic = true }, 21 | } 22 | end 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_scrollview/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | ScrollView = { bg = colors.__vscode_global_window_scrollview_background }, 7 | } 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_tree/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | NvimTreeSymlink = { fg = colors.__vscode_extra_decorate_color }, 7 | NvimTreeRootFolder = { fg = colors.__vscode_extra_decorate_color }, 8 | NvimTreeFolderName = { fg = colors.__vscode_tree_fonts_foreground }, 9 | NvimTreeFolderIcon = { fg = colors.__vscode_tree_icons_foreground }, 10 | NvimTreeEmptyFolderName = { link = "NvimTreeFolderName" }, 11 | NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" }, 12 | NvimTreeExecFile = { link = "NvimTreeFolderName" }, 13 | NvimTreeOpenedFile = { link = "NvimTreeFolderName" }, 14 | NvimTreeModifiedFile = { link = "NvimTreeFolderName" }, 15 | NvimTreeSpecialFile = { link = "NvimTreeFolderName" }, 16 | NvimTreeImageFile = { link = "NvimTreeFolderName" }, 17 | NvimTreeIndentMarker = { link = "NvimTreeFolderName" }, 18 | NvimTreeNormal = { fg = colors.__vscode_tree_fonts_foreground, bg = colors.__vscode_local_background }, 19 | NvimTreeEndOfBuffer = { link = "NvimTreeNormal" }, 20 | NvimTreeGitDirty = { fg = colors.__vscode_tree_fonts_foreground }, 21 | NvimTreeGitNew = { fg = colors.__vscode_git_added_foreground }, 22 | NvimTreeGitStaged = { fg = colors.__vscode_git_stage_modified_foreground }, 23 | NvimTreeGitMerge = { fg = colors.__vscode_git_modified_foreground }, 24 | NvimTreeGitRenamed = { fg = colors.__vscode_git_rename_foreground }, 25 | NvimTreeGitDeleted = { fg = colors.__vscode_git_stage_deleted_foreground }, 26 | NvimTreeGitIgnored = { fg = colors.__vscode_git_ignore_foreground }, 27 | NvimTreeBookmark = { fg = colors.__vscode_extra_decorate_color }, 28 | NvimTreeWindowPicker = { 29 | fg = colors.__vscode_statusline_foreground, 30 | bg = colors.__vscode_statusline_background, 31 | }, 32 | } 33 | end 34 | 35 | return M 36 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_treesitter/init.lua: -------------------------------------------------------------------------------- 1 | -- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md 2 | 3 | local M = {} 4 | 5 | ---@diagnostic disable-next-line: unused-local 6 | function M.get_highlight(conf, colors) 7 | return { 8 | ["@text.literal"] = {}, 9 | ["conceal"] = {}, 10 | ["@text.underline"] = { fg = colors.__vscode_number }, 11 | ["@text.reference"] = { fg = colors.__vscode_diff_text_foreground }, 12 | ["@text.uri"] = { fg = colors.__vscode_comment }, 13 | ["@text.title"] = { fg = colors.__vscode_keyword, bold = true }, 14 | ["@text.todo"] = { 15 | fg = colors.__vscode_todo_foreground, 16 | bg = colors.__vscode_todo_background, 17 | }, 18 | ["@comment"] = { fg = colors.__vscode_comment }, 19 | ["@punctuation"] = { fg = colors.__vscode_variable }, 20 | ["@punctuation.bracket"] = { fg = colors.__vscode_variable }, 21 | ["@punctuation.delimiter"] = { fg = colors.__vscode_variable }, 22 | ["@punctuation.special"] = { fg = colors.__vscode_variable }, 23 | ["@attribute"] = { fg = colors.__vscode_type }, 24 | ["@attribute.builtin"] = { fg = colors.__vscode_type }, 25 | ["@constant"] = { fg = colors.__vscode_number }, 26 | ["@constant.builtin"] = { fg = colors.__vscode_keyword }, 27 | ["@constant.macro"] = { link = "@define" }, 28 | ["@define"] = { fg = colors.__vscode_define_foreground }, 29 | ["@macro"] = { link = "@define" }, 30 | ["@string"] = { fg = colors.__vscode_strings }, 31 | ["@string.escape"] = { fg = colors.__vscode_keyword }, 32 | ["@string.special"] = { link = "@punctuation.special" }, 33 | ["@string.regex"] = { fg = colors.__vscode_methods }, 34 | ["@string.emphasis"] = { fg = colors.__vscode_lsp_error }, 35 | ["@character"] = { link = "@string" }, 36 | ["@character.special"] = { link = "@punctuation.special" }, 37 | ["@number"] = { fg = colors.__vscode_number }, 38 | ["@boolean"] = { fg = colors.__vscode_keyword }, 39 | ["@float"] = { link = "@number" }, 40 | ["@function"] = { fg = colors.__vscode_methods }, 41 | ["@function.call"] = { fg = colors.__vscode_methods }, 42 | ["@function.builtin"] = { fg = colors.__vscode_type }, 43 | ["@function.macro"] = { fg = colors.__vscode_variable }, 44 | ["@parameter"] = { fg = colors.__vscode_variable }, 45 | ["@method"] = { link = "@function" }, 46 | ["@method.call"] = { link = "@function.call" }, 47 | ["@field"] = { fg = colors.__vscode_diff_text_foreground }, 48 | ["@property"] = { fg = colors.__vscode_variable }, 49 | ["@constructor"] = { link = "@method" }, 50 | ["@conditional"] = { fg = colors.__vscode_keyword }, 51 | ["@conditional.ternary"] = { fg = colors.__vscode_variable }, 52 | ["@repeat"] = { fg = colors.__vscode_keyword }, 53 | ["@label"] = { fg = colors.__vscode_tag_foreground }, 54 | ["@operator"] = { fg = colors.__vscode_variable }, 55 | ["@keyword"] = { fg = colors.__vscode_keyword }, 56 | ["@exception"] = { fg = colors.__vscode_keyword }, 57 | ["@variable"] = { fg = colors.__vscode_variable }, 58 | ["@variable.builtin"] = { fg = colors.__vscode_keyword }, 59 | ["@type"] = { fg = colors.__vscode_type }, 60 | ["@type.definition"] = { fg = colors.__vscode_type }, 61 | ["@type.builtin"] = { fg = colors.__vscode_keyword }, 62 | ["@type.qualifier"] = { fg = colors.__vscode_keyword }, 63 | ["@storageclass"] = { fg = colors.__vscode_keyword }, 64 | ["@structure"] = { fg = colors.__vscode_keyword }, 65 | ["@namespace"] = { fg = colors.__vscode_type }, 66 | ["@include"] = { fg = colors.__vscode_keyword }, 67 | ["@preproc"] = { fg = colors.__vscode_head }, 68 | ["@debug"] = { fg = colors.__vscode_key }, 69 | ["@tag"] = { fg = colors.__vscode_keyword }, 70 | ["@tag.delimiter"] = { fg = colors.__vsocode_tag_warpper_foreground }, 71 | ["@tag.attribute"] = { fg = colors.__vscode_diff_text_foreground }, 72 | 73 | -- CSS 74 | ["@type.css"] = { fg = colors.__vscode_methods }, 75 | ["@property.css"] = { fg = colors.__vscode_diff_text_foreground }, 76 | ["@punctuation.bracket.css"] = { 77 | fg = colors.__vscode_bracket_level_01_foreground, 78 | }, 79 | ["@punctuation.delimiter.css"] = { 80 | fg = colors.__vscode_methods, 81 | }, 82 | 83 | -- TS 84 | ["@type.typescript"] = { 85 | fg = colors.__vscode_typescript_type_foreground, 86 | }, 87 | ["@property.typescript"] = { 88 | fg = colors.__vscode_typescript_type_foreground, 89 | }, 90 | ["@punctuation.special.typescript"] = { fg = colors.__vscode_keyword }, 91 | 92 | -- JS 93 | ["@punctuation.special.javascript"] = { fg = colors.__vscode_keyword }, 94 | 95 | -- MD 96 | ["@punctuation.special.markdown"] = { fg = colors.__vscode_keyword }, 97 | ["@label.markdown"] = { fg = colors.__vscode_inactive_table_foreground }, 98 | 99 | -- HTML 100 | ["@constant.html"] = { fg = colors.__vscode_variable }, 101 | ["@text.title.html"] = { fg = colors.__vscode_variable }, 102 | 103 | -- CPP 104 | ["@type.cpp"] = { fg = colors.__vscode_keyword }, 105 | ["@constructor.cpp"] = { fg = colors.__vscode_type }, 106 | 107 | -- LUA 108 | ["@function.builtin.lua"] = { fg = colors.__vscode_methods }, 109 | 110 | -- RUST 111 | ["@function.macro.rust"] = { fg = colors.__vscode_file }, 112 | 113 | -- JSON5 114 | ["@keyword.json5"] = { link = "@label.json" }, 115 | 116 | -- REGEX 117 | ---@diagnostic disable-next-line: duplicate-index 118 | ["@string.regex"] = { 119 | link = "@string", 120 | }, 121 | ["@variable.builtin.regex"] = { 122 | fg = colors.__vscode_file, 123 | }, 124 | ["@punctuation.bracket.regex"] = { 125 | fg = colors.__vscode_keyword, 126 | }, 127 | ["@property.regex"] = { 128 | fg = colors.__vscode_keyword, 129 | }, 130 | ["@operator.regex"] = { 131 | fg = colors.__vscode_file, 132 | }, 133 | 134 | -- https://github.com/nvim-treesitter/nvim-treesitter/commit/1ae9b0e4558fe7868f8cda2db65239cfb14836d0 135 | 136 | -- " tree-sitter "standard capture names" 137 | ["@variable.parameter"] = { link = "@parameter" }, 138 | ["@variable.member"] = { link = "@field" }, 139 | ["@module"] = { link = "@namespace" }, 140 | ["@number.float"] = { link = "@float" }, 141 | ["@string.special.symbol"] = { link = "@symbol" }, 142 | ["@string.regexp"] = { link = "@string.regex" }, 143 | ["@markup.strong"] = { link = "@text.strong" }, 144 | ["@markup.italic"] = { link = "@text.emphasis" }, 145 | ["@markup.underline"] = { link = "@text.underline" }, 146 | ["@markup.strikethrough"] = { link = "@text.strike" }, 147 | ["@markup.heading"] = { link = "@text.title" }, 148 | ["@markup.quote"] = { link = "@text.quote" }, 149 | ["@markup.link.url"] = { link = "@text.uri" }, 150 | ["@markup.math"] = { link = "@text.math" }, 151 | ["@markup.environment"] = { link = "@text.environment" }, 152 | ["@markup.environment.name"] = { link = "@text.environment.name" }, 153 | ["@markup.link"] = { link = "@text.reference" }, 154 | ["@markup.raw"] = { link = "@text.literal" }, 155 | ["@markup.raw.block"] = { link = "@text.literal.block" }, 156 | ["@markup.link.label"] = { link = "@string.special" }, 157 | ["@markup.list"] = { link = "@punctuation.special" }, 158 | 159 | -- " Helix captures 160 | ["@function.method"] = { link = "@method" }, 161 | ["@function.method.call"] = { link = "@method.call" }, 162 | ["@comment.todo"] = { link = "@text.todo" }, 163 | ["@comment.error"] = { link = "@text.danger" }, 164 | ["@comment.warning"] = { link = "@text.warning" }, 165 | ["@comment.hint"] = { link = "@text.note" }, 166 | ["@comment.info"] = { link = "@text.note" }, 167 | ["@comment.note"] = { link = "@text.note" }, 168 | ["@comment.ok"] = { link = "@text.note" }, 169 | ["@diff.plus"] = { link = "@text.diff.add" }, 170 | ["@diff.minus"] = { link = "@text.diff.delete" }, 171 | ["@diff.delta"] = { link = "@text.diff.change" }, 172 | ["@string.special.url"] = { link = "@text.uri" }, 173 | ["@keyword.storage"] = { link = "@storageclass" }, 174 | ["@keyword.directive"] = { link = "@define" }, 175 | ["@keyword.conditional"] = { link = "@conditional" }, 176 | ["@keyword.debug"] = { link = "@debug" }, 177 | ["@keyword.exception"] = { link = "@exception" }, 178 | ["@keyword.import"] = { link = "@include" }, 179 | ["@keyword.repeat"] = { link = "@repeat" }, 180 | } 181 | end 182 | 183 | return M 184 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_ts_rainbow/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | rainbowcol1 = { fg = colors.__vscode_bracket_level_01_foreground }, 7 | rainbowcol2 = { fg = colors.__vscode_bracket_level_02_foreground }, 8 | rainbowcol3 = { fg = colors.__vscode_bracket_level_03_foreground }, 9 | rainbowcol4 = { fg = colors.__vscode_bracket_level_01_foreground }, 10 | rainbowcol5 = { fg = colors.__vscode_bracket_level_02_foreground }, 11 | rainbowcol6 = { fg = colors.__vscode_bracket_level_03_foreground }, 12 | rainbowcol7 = { fg = colors.__vscode_bracket_level_01_foreground }, 13 | } 14 | end 15 | 16 | return M 17 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/nvim_ts_rainbow2/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | TSRainbowRed = { fg = colors.__vscode_bracket_level_01_foreground }, 7 | TSRainbowYellow = { fg = colors.__vscode_bracket_level_02_foreground }, 8 | TSRainbowBlue = { fg = colors.__vscode_bracket_level_03_foreground }, 9 | TSRainbowOrange = { fg = colors.__vscode_bracket_level_01_foreground }, 10 | TSRainbowGreen = { fg = colors.__vscode_bracket_level_02_foreground }, 11 | TSRainbowViolet = { fg = colors.__vscode_bracket_level_03_foreground }, 12 | TSRainbowCyan = { fg = colors.__vscode_bracket_level_01_foreground }, 13 | } 14 | end 15 | 16 | return M 17 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/telescope/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | TelescopeSelectionCaret = { fg = colors.__vscode_extra_decorate_color }, 7 | TelescopeBorder = { fg = colors.__vscode_window_spearator_color }, 8 | TelescopeTitle = { link = "Title" }, 9 | TelescopeSelection = { 10 | bg = colors.__vscode_onaction_cursor_line_background, 11 | bold = true, 12 | }, 13 | TelescopeMatching = { 14 | fg = colors.__vscode_extra_decorate_color, 15 | }, 16 | } 17 | end 18 | 19 | return M 20 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/vim_illuminate/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | IlluminatedWordText = { bg = colors.__vscode_other_word_highlight_background }, 7 | IlluminatedWordRead = { bg = colors.__vscode_other_word_highlight_background }, 8 | IlluminatedWordWrite = { bg = colors.__vscode_other_word_highlight_background }, 9 | } 10 | end 11 | 12 | return M 13 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/vim_visual_multi/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | VM_Extend_hl = { fg = colors.__vscode_background, bg = colors.__vscode_head }, 7 | VM_Cursor_hl = { fg = colors.__vscode_background, bg = colors.__vscode_head }, 8 | VM_Mono_hl = { fg = colors.__vscode_background, bg = colors.__vscode_file }, 9 | VM_insert_hl = { fg = colors.__vscode_background, bg = colors.__vscode_lsp_warn }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/expands/which_key/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | WhichKey = { fg = colors.__vscode_extra_decorate_color }, 7 | WhichKeySeparator = { fg = colors.__vscode_methods }, 8 | WhichKeyGroup = { fg = colors.__vscode_strings }, 9 | WhichKeyDesc = { fg = colors.__vscode_comment }, 10 | } 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/hooks/init.lua: -------------------------------------------------------------------------------- 1 | local light_icons = require("visual_studio_code.core.hooks.light_icons") 2 | 3 | local M = {} 4 | 5 | -- FIX: Complex structure 6 | --[[ 7 | The hook function here will be automatically loaded according to `conf.mode`. 8 | Currently only `light` mode needs to use these hooks to change some highlights. 9 | The problem is that this makes it difficult to manage different mode hook functions, so it should be optimized in structure 10 | ]] 11 | 12 | function M.before(conf, colors, utils) 13 | -- mode hooks 14 | conf.hooks.before(conf, colors, utils) 15 | 16 | local hook_before = M[("%s_%s"):format(conf.mode, "before")] 17 | if conf.preset and hook_before then 18 | hook_before(conf, colors, utils) 19 | end 20 | end 21 | 22 | function M.after(conf, colors, utils) 23 | local hook_after = M[("%s_%s"):format(conf.mode, "after")] 24 | if conf.preset and hook_after then 25 | hook_after(conf, colors, utils) 26 | end 27 | 28 | -- mode hooks 29 | conf.hooks.after(conf, colors, utils) 30 | end 31 | 32 | ---@diagnostic disable-next-line: unused-local 33 | function M.light_before(conf, colors, utils) 34 | -- The `nvim-web-devicons` plugin does not have a proper background color for `light` mode 35 | -- So here we will modify the background color of some common icons so that you can see it better 36 | for _, icon_options in ipairs(light_icons) do 37 | utils.hl.set(("DevIcon%s"):format(icon_options[1]), { fg = icon_options.colors }) 38 | end 39 | end 40 | 41 | ---@diagnostic disable-next-line: unused-local 42 | function M.light_after(conf, colors, utils) 43 | utils.hl.bulk_set({ 44 | PmenuSel = { 45 | fg = colors.__vscode_onactive_table_background, 46 | bg = colors.__vscode_local_completion_selected_background, 47 | }, 48 | }) 49 | 50 | if conf.expands.bufferline then 51 | utils.hl.bulk_set({ 52 | BufferLineIndicatorSelected = { 53 | fg = colors.__vscode_replace_search_color, 54 | bg = colors.__vscode_onactive_table_background, 55 | }, 56 | }) 57 | end 58 | end 59 | 60 | return M 61 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/hooks/light_icons.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { "log", colors = "#51A0CF" }, 3 | { "cfg", colors = "#51A0CF" }, 4 | { "prisma", colors = "#51A0CF" }, 5 | { "sql", colors = "#89E051" }, 6 | { "sqlite", colors = "#89E051" }, 7 | { "sqlite3", colors = "#89E051" }, 8 | { "otf", colors = "#7239b3" }, 9 | { "md", colors = "#7239b3" }, 10 | { "mdx", colors = "#7239b3" }, 11 | { "mk", colors = "#7239b3" }, 12 | { "makefile", colors = "#6D8086" }, 13 | { "Makefile", colors = "#6D8086" }, 14 | { "GNUmakefile", colors = "#6D8086" }, 15 | { "import", colors = "#F69A1B" }, 16 | { "haml", colors = "#F69A1B" }, 17 | { "godot", colors = "#F69A1B" }, 18 | { "fnl", colors = "#1E5CB3" }, 19 | { "dump", colors = "#1E5CB3" }, 20 | { "db", colors = "#1E5CB3" }, 21 | { "cfg", colors = "#FF3E00" }, 22 | { "CMakeLists.txt", colors = "#FF3E00" }, 23 | } 24 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.get_basic_highlight(conf, colors) 4 | local basic = require("visual_studio_code.core.basic") 5 | return basic.get_highlight(conf, colors) 6 | end 7 | 8 | function M.get_expands_highlight(conf, colors) 9 | local expands = {} 10 | local expands_directory = "visual_studio_code.core.expands" 11 | 12 | local enable_expands_table = vim.tbl_filter(function(key) 13 | return conf.expands[key] 14 | end, vim.tbl_keys(conf.expands)) 15 | 16 | -- Load all plugin color schemes 17 | for _, expand_name in ipairs(enable_expands_table) do 18 | local ok, expand_module = pcall(require, ("%s.%s"):format(expands_directory, expand_name)) 19 | 20 | if ok then 21 | expands = vim.tbl_extend("force", expands, expand_module.get_highlight(conf, colors)) 22 | else 23 | vim.api.nvim_echo({ 24 | { 25 | ("%s : is not exists"):format(expand_name), 26 | "ErrorMsg", 27 | }, 28 | }, true, {}) 29 | end 30 | end 31 | 32 | return expands 33 | end 34 | 35 | function M.get_transparent_highlight(conf, colors) 36 | local transparent = require("visual_studio_code.core.transparent") 37 | return transparent.get_highlight(conf, colors) 38 | end 39 | 40 | return M 41 | -------------------------------------------------------------------------------- /lua/visual_studio_code/core/transparent.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | ---@diagnostic disable-next-line: unused-local 4 | function M.get_highlight(conf, colors) 5 | return { 6 | Normal = { fg = colors.__vscode_foreground }, 7 | NormalFloat = { fg = colors.__vscode_foreground }, 8 | Directory = { fg = colors.__vscode_extra_decorate_color, bold = true }, 9 | -- NOTE: It may be a structure that needs to be optimized, the plugin and the basic highlight group should not be coupled here 10 | -- Nvim-Tree 11 | NvimTreeNormal = { fg = colors.__vscode_tree_fonts_foreground }, 12 | } 13 | end 14 | 15 | return M 16 | -------------------------------------------------------------------------------- /lua/visual_studio_code/extra/bufferline/right.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable-next-line: unused-local 2 | return function(conf, colors) 3 | return function() 4 | return { 5 | { text = " ", bg = colors.__vscode_local_background, fg = colors.__vscode_onactive_table_foreground }, 6 | { text = " ", bg = colors.__vscode_local_background, fg = colors.__vscode_onactive_table_foreground }, 7 | { text = " ", bg = colors.__vscode_local_background, fg = colors.__vscode_onactive_table_foreground }, 8 | } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lua/visual_studio_code/extra/lualine/sections.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: unused-local 2 | return function(conf, colors) 3 | return { 4 | lualine_a = { 5 | { 6 | "headers", 7 | fmt = function(content, context) 8 | return "  " 9 | end, 10 | }, 11 | }, 12 | lualine_b = { 13 | { "branch", icon = "" }, 14 | { 15 | "mode", 16 | fmt = function(content, context) 17 | return ("-- %s --"):format(content) 18 | end, 19 | }, 20 | }, 21 | lualine_c = { 22 | { 23 | "filename", 24 | symbols = { 25 | modified = "", 26 | readonly = "", 27 | unnamed = "", 28 | newfile = "", 29 | }, 30 | }, 31 | }, 32 | lualine_x = { 33 | { 34 | "space_style", 35 | fmt = function(content, context) 36 | ---@diagnostic disable-next-line: param-type-mismatch 37 | local expand = vim.opt_local.expandtab:get() 38 | ---@diagnostic disable-next-line: param-type-mismatch 39 | local widht = vim.opt_local.shiftwidth:get() 40 | local style = expand and "Spaces" or "Tab Size" 41 | return ("%s: %s"):format(style, widht) 42 | end, 43 | }, 44 | "encoding", 45 | { 46 | "fileformat", 47 | icons_enabled = false, 48 | fmt = function(content, context) 49 | local style = { 50 | mac = "LF", 51 | unix = "LF", 52 | dos = "CRLF", 53 | } 54 | return style[content] 55 | end, 56 | }, 57 | }, 58 | lualine_y = { 59 | { 60 | "location", 61 | padding = { left = 0, right = 1 }, 62 | }, 63 | { 64 | "progress", 65 | fmt = function(content, context) 66 | local visual_str = { 67 | ["v"] = true, 68 | ["V"] = true, 69 | ["\22"] = true, 70 | } 71 | if visual_str[tostring(vim.fn.mode())] then 72 | local ln_beg = vim.fn.line("v") 73 | local ln_end = vim.fn.line(".") 74 | -- local end = vim.fn.line("") 75 | local lines = ln_beg <= ln_end and ln_end - ln_beg + 1 or ln_beg - ln_end + 1 76 | return ("- %d -"):format(tostring(lines)) 77 | end 78 | 79 | return content 80 | end, 81 | }, 82 | }, 83 | lualine_z = { 84 | { 85 | "filetype", 86 | icons_enabled = false, 87 | }, 88 | { 89 | "decorate", 90 | fmt = function(content, context) 91 | --  92 | return "  " 93 | end, 94 | }, 95 | }, 96 | } 97 | end 98 | -------------------------------------------------------------------------------- /lua/visual_studio_code/init.lua: -------------------------------------------------------------------------------- 1 | -- author: askfiy 2 | -- date: 2023-03-01 3 | -- repo: https://github.com/askfiy/visual_studio_code 4 | 5 | -- An interesting neovim colors scheme plugin .. 6 | 7 | local core = require("visual_studio_code.core") 8 | local utils = require("visual_studio_code.utils") 9 | local hooks = require("visual_studio_code.core.hooks") 10 | 11 | local default_colors = require("visual_studio_code.colors") 12 | local default_config = require("visual_studio_code.config") 13 | 14 | -- NOTE: Develop test mode !! 15 | -- require("visual_studio_code.test") 16 | 17 | local function apply_basic_highlight(conf, mode_colors) 18 | utils.hl.bulk_set(core.get_basic_highlight(conf, mode_colors)) 19 | end 20 | 21 | ---@diagnostic disable-next-line: unused-function, unused-local 22 | local function apply_expands_highlight(conf, mode_colors) 23 | utils.hl.bulk_set(core.get_expands_highlight(conf, mode_colors)) 24 | end 25 | 26 | local function apply_transparent_highlight(conf, mode_colors) 27 | if conf.transparent then 28 | utils.hl.bulk_set(core.get_transparent_highlight(conf, mode_colors)) 29 | end 30 | end 31 | 32 | local M = { 33 | _conf = { 34 | -- user config 35 | }, 36 | _colors = { 37 | -- current colors 38 | }, 39 | } 40 | 41 | function M.setup(opts) 42 | M._conf = vim.tbl_deep_extend("force", default_config, opts or {}) 43 | M._colors = default_colors.get_colors(M._conf.mode) 44 | end 45 | 46 | function M.enter() 47 | local config = M.get_config() 48 | local colors = M.get_colors() 49 | 50 | if vim.tbl_isempty(config) then 51 | -- use default config 52 | config = default_config 53 | end 54 | 55 | if vim.tbl_isempty(colors) then 56 | -- use default colors 57 | colors = default_colors.get_colors("dark") 58 | end 59 | 60 | vim.opt.background = config.mode 61 | 62 | vim.cmd("highlight clear") 63 | if vim.fn.exists("syntax_on") == 1 then 64 | vim.cmd("syntax reset") 65 | end 66 | 67 | -- First it will run the global hook function, which is a necessary job 68 | -- For `light` mode, it will adjust the highlighting of some plugins, such as: nvim-web-devicons 69 | -- Second, it will run the user-defined hook function, you can change any highlight group you want in the custom hook function 70 | hooks.before(config, colors, utils) 71 | 72 | if config.preset then 73 | apply_basic_highlight(config, colors) 74 | apply_expands_highlight(config, colors) 75 | apply_transparent_highlight(config, colors) 76 | end 77 | 78 | hooks.after(config, colors, utils) 79 | end 80 | 81 | function M.get_config() 82 | return M._conf 83 | end 84 | 85 | function M.get_colors() 86 | return M._colors 87 | end 88 | 89 | -- VScode statusline customized for `lualine` plugin 90 | function M.get_lualine_sections() 91 | return require("visual_studio_code.extra.lualine.sections")( 92 | M.get_config(), 93 | M.get_colors() 94 | ) 95 | end 96 | 97 | function M.get_bufferline_right() 98 | return require("visual_studio_code.extra.bufferline.right")( 99 | M.get_config(), 100 | M.get_colors() 101 | ) 102 | end 103 | 104 | return M 105 | -------------------------------------------------------------------------------- /lua/visual_studio_code/test/init.lua: -------------------------------------------------------------------------------- 1 | local colors_scheme = "visual_studio_code" 2 | 3 | local function dev_reload() 4 | for k, _ in pairs(package.loaded) do 5 | if k:match(colors_scheme) then 6 | package.loaded[k] = nil 7 | end 8 | end 9 | 10 | require(colors_scheme).setup() 11 | end 12 | 13 | -- When in development mode, press `pr` to quickly reload your changes 14 | vim.keymap.set({ "n" }, "pr", dev_reload, { silent = true, desc = "Test plugin function" }) 15 | -------------------------------------------------------------------------------- /lua/visual_studio_code/utils/hl.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | -- M.set("Normal", { fg = "#000000", bg = "#1E1E2E"}) 4 | function M.set(name, options) 5 | local ok, err = pcall(vim.api.nvim_set_hl, 0, name, options) 6 | 7 | if not ok then 8 | vim.api.nvim_echo({ 9 | { 10 | ("%s : set highlight failed\n %s"):format(name, err), 11 | "ErrorMsg", 12 | }, 13 | }, true, {}) 14 | end 15 | end 16 | 17 | -- M.link("NormalFloat", "Normal") 18 | function M.link(src, dst) 19 | local ok, err = pcall(vim.api.nvim_set_hl, 0, src, { link = dst }) 20 | 21 | if not ok then 22 | vim.api.nvim_echo({ 23 | { 24 | ("%s link to highlight %s failed\n %s"):format(src, dst, err), 25 | "ErrorMsg", 26 | }, 27 | }, true, {}) 28 | end 29 | end 30 | 31 | -- M.get("Normal", "fg") 32 | function M.get(name, option) 33 | local ok, rs = pcall(vim.api.nvim_get_hl, 0, { name = name }) 34 | vim.print(ok, rs) 35 | local kd_as = { 36 | foreground = "fg", 37 | background = "bg", 38 | special = "sp", 39 | } 40 | 41 | if not ok then 42 | vim.api.nvim_echo({ 43 | { 44 | ("%s : get highlight failed\n %s"):format(name, rs), 45 | "ErrorMsg", 46 | }, 47 | }, true, {}) 48 | 49 | return 50 | end 51 | 52 | for kw, as in pairs(kd_as) do 53 | if rs[kw] then 54 | local rgb = ("#%06x"):format(rs[kw]) 55 | rs[kw] = rgb 56 | rs[as] = rgb 57 | end 58 | end 59 | 60 | return option and rs[option] or rs 61 | end 62 | 63 | -- M.bulk_set({ 64 | -- Normal = { fg = "#000000", bg = "#1E1E2E"}, 65 | -- NormalFloat = { link = "Normal" }, 66 | -- Cursor = { bg = "#0FE1EE", bold = true } 67 | -- }) 68 | function M.bulk_set(groups) 69 | local link_group = {} 70 | if not vim.tbl_isempty(groups) then 71 | for name, options in pairs(groups) do 72 | if not options.link then 73 | M.set(name, options) 74 | else 75 | link_group[name] = options.link 76 | end 77 | end 78 | for src, dst in pairs(link_group) do 79 | M.link(src, dst) 80 | end 81 | end 82 | end 83 | 84 | return M 85 | -------------------------------------------------------------------------------- /lua/visual_studio_code/utils/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.hl = require("visual_studio_code.utils.hl") 4 | 5 | return M 6 | -------------------------------------------------------------------------------- /screen/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/dark.png -------------------------------------------------------------------------------- /screen/dark01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/dark01.png -------------------------------------------------------------------------------- /screen/dark02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/dark02.png -------------------------------------------------------------------------------- /screen/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/light.png -------------------------------------------------------------------------------- /screen/light01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/light01.png -------------------------------------------------------------------------------- /screen/light02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askfiy/visual_studio_code/ff7fd467e6c82bd1e062d64f60428cf36b0e99c6/screen/light02.png --------------------------------------------------------------------------------