Delete jupytex & add more firefox extensions
This commit is contained in:
		
					parent
					
						
							
								964fc2af28
							
						
					
				
			
			
				commit
				
					
						500f79cbdf
					
				
			
		
					 7 changed files with 15 additions and 55 deletions
				
			
		|  | @ -83,7 +83,7 @@ local abbreviations = { | |||
|   { "nope", "\\bot" }, | ||||
|   { "yee", "\\top" }, | ||||
|   { "ccan", "\\cancel" }, | ||||
|   { "comp", "\\circ" }, | ||||
|   { "com", "\\circ" }, | ||||
|   { "mul", "\\cdot" }, | ||||
|   { "smul", "\\times" }, | ||||
|   { "card", "\\#" }, | ||||
|  |  | |||
|  | @ -1,43 +0,0 @@ | |||
| local env = require("my.helpers.env") | ||||
| 
 | ||||
| local M = { | ||||
|   "goerz/jupytext.vim", | ||||
|   ft = "ipynb", | ||||
|   cond = env.vscode.not_active(), | ||||
| } | ||||
| 
 | ||||
| function M.config() | ||||
|   -- Use %% as cell delimiter | ||||
|   vim.g.jupytext_fmt = "py:percent" | ||||
| end | ||||
| 
 | ||||
| function M.init() | ||||
|   vim.cmd([[ | ||||
|         function GetJupytextFold(linenum) | ||||
|             if getline(a:linenum) =~ "^#\\s%%" | ||||
|                 " start fold | ||||
|                 return ">1" | ||||
|             elseif getline(a:linenum + 1) =~ "^#\\s%%" | ||||
|                 return "<1" | ||||
|             else | ||||
|                 return "-1" | ||||
|             endif | ||||
|         endfunction | ||||
|       ]]) | ||||
| 
 | ||||
|   -- Set the correct foldexpr | ||||
|   vim.api.nvim_create_autocmd("BufEnter", { | ||||
|     pattern = { "*.ipynb" }, | ||||
|     group = vim.api.nvim_create_augroup("JupytextFoldExpr", {}), | ||||
|     callback = function() | ||||
|       vim.cmd([[ | ||||
|             setlocal foldexpr=GetJupytextFold(v:lnum) | ||||
|             setlocal foldmethod=expr | ||||
|             " Deletes and pastes all text. Used to refresh folds. | ||||
|             :norm ggVGdpggdd | ||||
|           ]]) | ||||
|     end, | ||||
|   }) | ||||
| end | ||||
| 
 | ||||
| return M | ||||
							
								
								
									
										8
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							|  | @ -433,11 +433,11 @@ | |||
|       }, | ||||
|       "locked": { | ||||
|         "dir": "pkgs/firefox-addons", | ||||
|         "lastModified": 1686838518, | ||||
|         "narHash": "sha256-MqwA95DbSSCmk1mgL12TEdc1rQ7uyqxUDGLikrfj9yw=", | ||||
|         "lastModified": 1694585600, | ||||
|         "narHash": "sha256-X+3lxErOk5DNuyJZM7dNAaIpxadv8wMjj6pYxwpjPkc=", | ||||
|         "ref": "refs/heads/master", | ||||
|         "rev": "c063e239e617477b89a320349bfbf6c1a243c642", | ||||
|         "revCount": 2928, | ||||
|         "rev": "1d028825099440cd83f934967dd20cf1f0a453f5", | ||||
|         "revCount": 3084, | ||||
|         "type": "git", | ||||
|         "url": "https://gitlab.com/rycee/nur-expressions?dir=pkgs/firefox-addons" | ||||
|       }, | ||||
|  |  | |||
|  | @ -24,11 +24,9 @@ | |||
|     fd # Better find | ||||
|     sd # Better sed | ||||
|     httpie # Better curl | ||||
|     ouch # Unified compression / decompression tool | ||||
|     mkpasswd # Hash passwords | ||||
|     neofetch # Display system information | ||||
|     zip # Zipping files | ||||
|     unzip # Unzipping files | ||||
|     unrar # For extracting shit from rars | ||||
|     tokei # Useless but fun line of code counter (sloc alternative) | ||||
|     bottom # System monitor | ||||
|     tldr # Example based cli docs | ||||
|  |  | |||
|  | @ -3,9 +3,12 @@ let | |||
|   # {{{ Global extensions | ||||
|   extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ | ||||
|     buster-captcha-solver | ||||
|     bypass-paywalls-clean | ||||
|     # REASON: returns 404 for now | ||||
|     # bypass-paywalls-clean | ||||
|     clearurls # removes ugly args from urls | ||||
|     cliget # Generates curl commands for downloading account-protected things | ||||
|     don-t-fuck-with-paste # disallows certain websites from disabling pasting | ||||
|     decentraleyes # Serves local copies of a bunch of things instead of reaching a CDN | ||||
|     gesturefy # mouse gestures | ||||
|     i-dont-care-about-cookies | ||||
|     localcdn # caches libraries locally | ||||
|  | @ -44,6 +47,9 @@ in | |||
|       # }}} | ||||
|       # {{{ Extensions | ||||
|       extensions = with inputs.firefox-addons.packages.${pkgs.system}; extensions ++ [ | ||||
|         augmented-steam # Adds more info to steam | ||||
|         blocktube # Lets you block youtube channels | ||||
|         dearrow # Crowdsourced clickbait remover 💀 | ||||
|         firenvim # summon a nvim instance inside the browser | ||||
|         lovely-forks # displays forks on github | ||||
|         octolinker # github import to link thingy | ||||
|  |  | |||
|  | @ -55,7 +55,6 @@ misc { | |||
| # Execute apps at launch | ||||
| exec-once = wezterm & firefox & discocss & spotify & obsidian | ||||
| 
 | ||||
| 
 | ||||
| # {{{ Window rules | ||||
| # {{{ Automatically move stuff to workspaces | ||||
| windowrulev2 = workspace 2 silent, title:^(.*Firefox.*)$  | ||||
|  |  | |||
|  | @ -1,4 +1,3 @@ | |||
| { lib, ... }: | ||||
| let | ||||
|   chord = from: to: { inherit from to; }; | ||||
|   unmap = from: chord from [ ]; | ||||
|  | @ -46,7 +45,8 @@ let | |||
|     (chord [ "n" "l" "s" ] [ "leftmeta" "6" ]) | ||||
|     (chord [ "n" "l" "d" ] [ "leftmeta" "7" ]) | ||||
|     (chord [ "n" "l" "f" ] [ "leftmeta" "8" ]) | ||||
|     (chord [ "n" "k" "l" ] [ "leftmeta" "p" ]) | ||||
|     (chord [ "n" "l" "z" ] [ "leftmeta" "9" ]) | ||||
|     (chord [ "n" "l" "x" ] [ "leftmeta" "0" ]) | ||||
|     # }}} | ||||
|     # {{{ Handled by vim | ||||
|     (chord [ "j" "k" ] [ "f10" ]) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matei Adriel
				Matei Adriel