forked from stitchy/dotfiles
		
	It still does not work, I wonder why
This commit is contained in:
		
							parent
							
								
									c2796dcfb9
								
							
						
					
					
						commit
						e6e98a16de
					
				
					 6 changed files with 303 additions and 14 deletions
				
			
		
							
								
								
									
										149
									
								
								config/neovim/init.vim
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										149
									
								
								config/neovim/init.vim
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,149 @@ | ||||||
|  | " (Neo)vim Configuration  | ||||||
|  | " By Flying_Stitchman | ||||||
|  | " 4 Jan 2022 | ||||||
|  | 
 | ||||||
|  |  " Basic Configuration | ||||||
|  | 
 | ||||||
|  | syntax on | ||||||
|  | set spell | ||||||
|  | set hlsearch | ||||||
|  | set ignorecase | ||||||
|  | set number relativenumber | ||||||
|  | set noswapfile | ||||||
|  | inoremap jk <ESC> | ||||||
|  | let mapleader = "`" | ||||||
|  | 
 | ||||||
|  |  " Make Lines Wrap Properly | ||||||
|  | set linebreak | ||||||
|  | set wrap | ||||||
|  |  " True Color Support | ||||||
|  | if has('nvim') | ||||||
|  |   set t_8f=[38;2;%lu;%lu;%lum | ||||||
|  |   set t_8b=[48;2;%lu;%lu;%lum | ||||||
|  |   set termguicolors  | ||||||
|  | endif | ||||||
|  | "colorscheme cwcolors | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |  " Highlight Trailing Spaces | ||||||
|  | let c_space_errors=1 | ||||||
|  | 
 | ||||||
|  | set noincsearch | ||||||
|  | 
 | ||||||
|  |  " Plugs | ||||||
|  | "call plug#begin() | ||||||
|  | "Plug 'neovim/nvim-lspconfig' | ||||||
|  | "Plug 'jackguo380/vim-lsp-cxx-highlight' | ||||||
|  | "Plug 'folke/tokyonight.nvim', { 'branch': 'main' } | ||||||
|  | "Plug 'tribela/vim-transparent' | ||||||
|  | "Plug 'hrsh7th/nvim-cmp' | ||||||
|  | "Plug 'hrsh7th/cmp-nvim-lsp' | ||||||
|  | "Plug 'saadparwaiz1/cmp_luasnip' | ||||||
|  | "Plug 'L3MON4D3/LuaSnip' | ||||||
|  | "call plug#end() | ||||||
|  | 
 | ||||||
|  | let g:airline#extensions#wordcount#filetypes = '\vasciidoc|help|mail|markdown|markdown.pandoc|org|rst|tex|text' | ||||||
|  | set laststatus=2    " enables vim-airline. | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |  " C Syntax highlighting | ||||||
|  | lua << EOF | ||||||
|  | require'lspconfig'.rust_analyzer.setup{} | ||||||
|  | require'lspconfig'.texlab.setup{} | ||||||
|  | require'lspconfig'.svls.setup{} | ||||||
|  | require'lspconfig'.pylsp.setup{ | ||||||
|  |   settings = { | ||||||
|  |     pylsp = { | ||||||
|  |       plugins = { | ||||||
|  |         pycodestyle = { | ||||||
|  |           ignore = {'W391'}, | ||||||
|  |           maxLineLength = 100 | ||||||
|  |         }, | ||||||
|  | 	pylint = { | ||||||
|  | 	  enabled = false | ||||||
|  | 	}, | ||||||
|  | 	pyflakes = { | ||||||
|  | 	  enabled = true | ||||||
|  | 	} | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | require'lspconfig'.ccls.setup{ | ||||||
|  | 	init_options = { | ||||||
|  | 		highlight = { | ||||||
|  | 			lsRanges = true; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | -- Add additional capabilities supported by nvim-cmp | ||||||
|  | local capabilities = require("cmp_nvim_lsp").default_capabilities() | ||||||
|  | 
 | ||||||
|  | local lspconfig = require('lspconfig') | ||||||
|  | 
 | ||||||
|  | -- Enable some language servers with the additional completion capabilities offered by nvim-cmp | ||||||
|  | local servers = { 'clangd', 'rust_analyzer',  'tsserver' } | ||||||
|  | for _, lsp in ipairs(servers) do | ||||||
|  |   lspconfig[lsp].setup { | ||||||
|  |     -- on_attach = my_custom_on_attach, | ||||||
|  |     capabilities = capabilities, | ||||||
|  |   } | ||||||
|  | end | ||||||
|  | 
 | ||||||
|  | -- luasnip setup | ||||||
|  | local luasnip = require 'luasnip' | ||||||
|  | 
 | ||||||
|  | -- nvim-cmp setup | ||||||
|  | local cmp = require 'cmp' | ||||||
|  | cmp.setup { | ||||||
|  |   snippet = { | ||||||
|  |     expand = function(args) | ||||||
|  |       luasnip.lsp_expand(args.body) | ||||||
|  |     end, | ||||||
|  |   }, | ||||||
|  |   mapping = cmp.mapping.preset.insert({ | ||||||
|  |     ['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up | ||||||
|  |     ['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down | ||||||
|  |     -- C-b (back) C-f (forward) for snippet placeholder navigation. | ||||||
|  |     ['<C-Space>'] = cmp.mapping.complete(), | ||||||
|  |     ['<CR>'] = cmp.mapping.confirm { | ||||||
|  |       behavior = cmp.ConfirmBehavior.Replace, | ||||||
|  |       select = true, | ||||||
|  |     }, | ||||||
|  |     ['<Tab>'] = cmp.mapping(function(fallback) | ||||||
|  |       if cmp.visible() then | ||||||
|  |         cmp.select_next_item() | ||||||
|  |       elseif luasnip.expand_or_jumpable() then | ||||||
|  |         luasnip.expand_or_jump() | ||||||
|  |       else | ||||||
|  |         fallback() | ||||||
|  |       end | ||||||
|  |     end, { 'i', 's' }), | ||||||
|  |     ['<S-Tab>'] = cmp.mapping(function(fallback) | ||||||
|  |       if cmp.visible() then | ||||||
|  |         cmp.select_prev_item() | ||||||
|  |       elseif luasnip.jumpable(-1) then | ||||||
|  |         luasnip.jump(-1) | ||||||
|  |       else | ||||||
|  |         fallback() | ||||||
|  |       end | ||||||
|  |     end, { 'i', 's' }), | ||||||
|  |   }), | ||||||
|  |   sources = { | ||||||
|  |     { name = 'nvim_lsp' }, | ||||||
|  |     { name = 'luasnip' }, | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |  " Color Themes | ||||||
|  | colorscheme tokyonight | ||||||
|  | hi Comment guifg=#e69dc5 | ||||||
|  | hi Linenr guifg=#a672f3 | ||||||
|  | @ -62,7 +62,7 @@ | ||||||
|     vimAlias = true; |     vimAlias = true; | ||||||
|     defaultEditor = true; |     defaultEditor = true; | ||||||
|     configure = { |     configure = { | ||||||
|       customRC = builtins.readFile /home/stitchynyan/.config/nvim/init.vim; |       customRC = builtins.readFile ./config/neovim/init.vim; | ||||||
|       packages.myVimPackage = with pkgs.vimPlugins; { |       packages.myVimPackage = with pkgs.vimPlugins; { | ||||||
|         start = [  |         start = [  | ||||||
| 	  nvim-lspconfig | 	  nvim-lspconfig | ||||||
|  |  | ||||||
							
								
								
									
										127
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										127
									
								
								flake.lock
									
										
									
										generated
									
									
									
								
							|  | @ -1,6 +1,85 @@ | ||||||
| { | { | ||||||
|   "nodes": { |   "nodes": { | ||||||
|  |     "home-manager": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "nixpkgs" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1691225770, | ||||||
|  |         "narHash": "sha256-O5slH8nW8msTAqVAS5rkvdHSkjmrO+JauuSDzZCmv2M=", | ||||||
|  |         "owner": "nix-community", | ||||||
|  |         "repo": "home-manager", | ||||||
|  |         "rev": "0a014a729cdd54d9919ff36b714d047909d7a4c8", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "nix-community", | ||||||
|  |         "ref": "master", | ||||||
|  |         "repo": "home-manager", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "hyprland": { | ||||||
|  |       "inputs": { | ||||||
|  |         "hyprland-protocols": "hyprland-protocols", | ||||||
|  |         "nixpkgs": "nixpkgs", | ||||||
|  |         "wlroots": "wlroots", | ||||||
|  |         "xdph": "xdph" | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1691270973, | ||||||
|  |         "narHash": "sha256-mm4JEJ8zTfSZPurYFOczJFuUUVlI+iBZKxbpcgKWN+M=", | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "Hyprland", | ||||||
|  |         "rev": "a077b7a92e87a3edd1cebb9bdd4c4fa3ec3d7bb7", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "Hyprland", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "hyprland-protocols": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "hyprland", | ||||||
|  |           "nixpkgs" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1684265364, | ||||||
|  |         "narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=", | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "hyprland-protocols", | ||||||
|  |         "rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "hyprland-protocols", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "nixpkgs": { |     "nixpkgs": { | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1690179384, | ||||||
|  |         "narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=", | ||||||
|  |         "owner": "NixOS", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "rev": "b12803b6d90e2e583429bb79b859ca53c348b39a", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "NixOS", | ||||||
|  |         "ref": "nixos-unstable", | ||||||
|  |         "repo": "nixpkgs", | ||||||
|  |         "type": "github" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "nixpkgs_2": { | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1691186842, |         "lastModified": 1691186842, | ||||||
|         "narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=", |         "narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=", | ||||||
|  | @ -18,7 +97,53 @@ | ||||||
|     }, |     }, | ||||||
|     "root": { |     "root": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "nixpkgs": "nixpkgs" |         "home-manager": "home-manager", | ||||||
|  |         "hyprland": "hyprland", | ||||||
|  |         "nixpkgs": "nixpkgs_2" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "wlroots": { | ||||||
|  |       "flake": false, | ||||||
|  |       "locked": { | ||||||
|  |         "host": "gitlab.freedesktop.org", | ||||||
|  |         "lastModified": 1691073628, | ||||||
|  |         "narHash": "sha256-LlxE3o3UzRY7APYVLGNKM30DBMcDifCRIQiMVSbYLIc=", | ||||||
|  |         "owner": "wlroots", | ||||||
|  |         "repo": "wlroots", | ||||||
|  |         "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5", | ||||||
|  |         "type": "gitlab" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "host": "gitlab.freedesktop.org", | ||||||
|  |         "owner": "wlroots", | ||||||
|  |         "repo": "wlroots", | ||||||
|  |         "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5", | ||||||
|  |         "type": "gitlab" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "xdph": { | ||||||
|  |       "inputs": { | ||||||
|  |         "hyprland-protocols": [ | ||||||
|  |           "hyprland", | ||||||
|  |           "hyprland-protocols" | ||||||
|  |         ], | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "hyprland", | ||||||
|  |           "nixpkgs" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1685385764, | ||||||
|  |         "narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=", | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "xdg-desktop-portal-hyprland", | ||||||
|  |         "rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1", | ||||||
|  |         "type": "github" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "owner": "hyprwm", | ||||||
|  |         "repo": "xdg-desktop-portal-hyprland", | ||||||
|  |         "type": "github" | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
							
								
								
									
										35
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										35
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -6,31 +6,44 @@ | ||||||
|       url = "github:NixOS/nixpkgs/nixos-unstable"; |       url = "github:NixOS/nixpkgs/nixos-unstable"; | ||||||
|     }; |     }; | ||||||
|      |      | ||||||
|     home-manager-unstable = { |     home-manager = { | ||||||
|       url = "github:nix-community/home-manager/master"; |       url = "github:nix-community/home-manager/master"; | ||||||
|         inputs.nixpkgs.follows = "nixpkgs-unstable"; |         inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     hyprland.url = "github:hyprwm/Hyprland"; |     hyprland.url = "github:hyprwm/Hyprland"; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   outputs = {  |   outputs = {  | ||||||
|     self,  |  | ||||||
|     nixpkgs, |     nixpkgs, | ||||||
|     home-manager-unstable, |     home-manager, | ||||||
|     hyprland |     hyprland, | ||||||
|  |     ... | ||||||
|   }: { |   }: { | ||||||
| 
 | 
 | ||||||
|  |     nixpkgs.hostPlatform = "x86_64-linux"; | ||||||
|  |        | ||||||
|  | 
 | ||||||
|  |     pkgs = import nixpkgs { | ||||||
|  |       #config.allowUnfree = true; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     nixosConfigurations = { |     nixosConfigurations = { | ||||||
|       stitchynyan = nixpkgs.lib.nixosSystem { | 
 | ||||||
|         system = "x86_64-linux"; |       hostname = nixpkgs.lib.nixosSystem { | ||||||
| 	modules = [ |         modules = [ | ||||||
| 	  ./configuration.nix | 	  ./configuration.nix | ||||||
|           home-manager-unstable.nixosModules.home-manager | 	  home-manager.nixosModules.home-manager | ||||||
|  | 	  { | ||||||
|  | 	  home-manager.useGlobalPkgs = true; | ||||||
|  | 	  home-manager.useUserPackages = false; | ||||||
|  | 	  home-manager.users.stitchynyan = import ./users/stitchynyan/home.nix ; | ||||||
|  | 	  } | ||||||
| 	  hyprland.homeManagerModules.default | 	  hyprland.homeManagerModules.default | ||||||
|         {wayland.windowManager.hyprland.enable = true;} |           {wayland.windowManager.hyprland.enable = true;} | ||||||
| 	]; | 	]; | ||||||
|       }; |       }; | ||||||
|     };  |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -11,7 +11,6 @@ | ||||||
|     librewolf |     librewolf | ||||||
|     kitty |     kitty | ||||||
|     exa |     exa | ||||||
|     hyprland |  | ||||||
|     git |     git | ||||||
|     zoxide |     zoxide | ||||||
|     nheko |     nheko | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								users/stitchynyan/home.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								users/stitchynyan/home.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | { config, pkgs, ... } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue