Merge remote-tracking branch 'origin/master'
This commit is contained in:
		
						commit
						9c6df06d38
					
				| @ -30,6 +30,7 @@ | |||||||
|       jq |       jq | ||||||
|       lm_sensors |       lm_sensors | ||||||
|       meson |       meson | ||||||
|  |       mosh | ||||||
|       msmtp |       msmtp | ||||||
|       nano |       nano | ||||||
|       neovim |       neovim | ||||||
| @ -40,6 +41,7 @@ | |||||||
|       ntfs3g |       ntfs3g | ||||||
|       ntfsprogs |       ntfsprogs | ||||||
|       openhantek6022 |       openhantek6022 | ||||||
|  |       optipng | ||||||
|       pax-utils |       pax-utils | ||||||
|       pciutils |       pciutils | ||||||
|       pstree |       pstree | ||||||
| @ -48,6 +50,7 @@ | |||||||
|       ripgrep |       ripgrep | ||||||
|       rsync |       rsync | ||||||
|       silver-searcher |       silver-searcher | ||||||
|  |       socat | ||||||
|       sshfs |       sshfs | ||||||
|       strace |       strace | ||||||
|       swaylock |       swaylock | ||||||
|  | |||||||
							
								
								
									
										42
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										42
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							| @ -185,6 +185,26 @@ | |||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "nvim": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "nixpkgs" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1698363600, | ||||||
|  |         "narHash": "sha256-r71uS/uw3I9xJAnmlgaN0TC9aC/1m2L4iNhKjqBzAtQ=", | ||||||
|  |         "ref": "refs/heads/master", | ||||||
|  |         "rev": "9652f4cb75d799ee5a2511883d2fda60bea00141", | ||||||
|  |         "revCount": 19, | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "https://git.project-cloud.net/asmir/nvim_flake" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "https://git.project-cloud.net/asmir/nvim_flake" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "peerix": { |     "peerix": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-compat": "flake-compat_2", |         "flake-compat": "flake-compat_2", | ||||||
| @ -212,9 +232,11 @@ | |||||||
|         "home-manager": "home-manager", |         "home-manager": "home-manager", | ||||||
|         "nix-xilinx": "nix-xilinx", |         "nix-xilinx": "nix-xilinx", | ||||||
|         "nixpkgs": "nixpkgs", |         "nixpkgs": "nixpkgs", | ||||||
|  |         "nvim": "nvim", | ||||||
|         "peerix": "peerix", |         "peerix": "peerix", | ||||||
|         "simple-nixos-mailserver": "simple-nixos-mailserver", |         "simple-nixos-mailserver": "simple-nixos-mailserver", | ||||||
|         "sops-nix": "sops-nix", |         "sops-nix": "sops-nix", | ||||||
|  |         "swaysw": "swaysw", | ||||||
|         "zremap": "zremap" |         "zremap": "zremap" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @ -264,6 +286,26 @@ | |||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "swaysw": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": [ | ||||||
|  |           "nixpkgs" | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |       "locked": { | ||||||
|  |         "lastModified": 1698401726, | ||||||
|  |         "narHash": "sha256-kGMqxaNaNSbKJS/55KqqMvLj1xOBc8zCizs6I3xiCo0=", | ||||||
|  |         "ref": "refs/heads/master", | ||||||
|  |         "rev": "1e49032fbfec10b51c9f627aab286290ac15977c", | ||||||
|  |         "revCount": 3, | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "https://git.project-cloud.net/asmir/swaysw" | ||||||
|  |       }, | ||||||
|  |       "original": { | ||||||
|  |         "type": "git", | ||||||
|  |         "url": "https://git.project-cloud.net/asmir/swaysw" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "systems": { |     "systems": { | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1681028828, |         "lastModified": 1681028828, | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								flake.nix
									
									
									
									
									
								
							| @ -19,6 +19,16 @@ | |||||||
|       inputs.nixpkgs.follows = "nixpkgs"; |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     swaysw = { | ||||||
|  |       url = "git+https://git.project-cloud.net/asmir/swaysw"; | ||||||
|  |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     nvim = { | ||||||
|  |       url = "git+https://git.project-cloud.net/asmir/nvim_flake"; | ||||||
|  |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|     sops-nix = { |     sops-nix = { | ||||||
|       url = "github:Mic92/sops-nix"; |       url = "github:Mic92/sops-nix"; | ||||||
|       inputs.nixpkgs.follows = "nixpkgs"; |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
| @ -39,9 +49,11 @@ | |||||||
|     home-manager, |     home-manager, | ||||||
|     nixpkgs, |     nixpkgs, | ||||||
|     nix-xilinx, |     nix-xilinx, | ||||||
|  |     nvim, | ||||||
|     peerix, |     peerix, | ||||||
|     simple-nixos-mailserver, |     simple-nixos-mailserver, | ||||||
|     sops-nix, |     sops-nix, | ||||||
|  |     swaysw, | ||||||
|     zremap, |     zremap, | ||||||
|     ... |     ... | ||||||
|   }: let |   }: let | ||||||
| @ -61,6 +73,7 @@ | |||||||
|             home-manager.useGlobalPkgs = true; |             home-manager.useGlobalPkgs = true; | ||||||
|             home-manager.useUserPackages = true; |             home-manager.useUserPackages = true; | ||||||
|             home-manager.users.akill = import ./home/home.nix; |             home-manager.users.akill = import ./home/home.nix; | ||||||
|  |             home-manager.extraSpecialArgs = {inherit inputs;}; | ||||||
|           } |           } | ||||||
|           peerix.nixosModules.peerix |           peerix.nixosModules.peerix | ||||||
|           { |           { | ||||||
|  | |||||||
| @ -2,11 +2,10 @@ | |||||||
|   pkgs, |   pkgs, | ||||||
|   config, |   config, | ||||||
|   lib, |   lib, | ||||||
|  |   inputs, | ||||||
|   ... |   ... | ||||||
| }: | }: | ||||||
| with lib; let | with lib; { | ||||||
|   vimrc = import ./vimrc.nix {inherit pkgs vimUtils fetchFromGitHub;}; |  | ||||||
| in { |  | ||||||
|   imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix]; |   imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix]; | ||||||
| 
 | 
 | ||||||
|   home.stateVersion = "22.11"; |   home.stateVersion = "22.11"; | ||||||
| @ -171,15 +170,6 @@ in { | |||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     neovim = { |  | ||||||
|       enable = true; |  | ||||||
|       vimAlias = true; |  | ||||||
|       vimdiffAlias = true; |  | ||||||
|       plugins = vimrc.plugins; |  | ||||||
|       extraConfig = ""; |  | ||||||
|       extraPackages = vimrc.extraPackages; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     obs-studio = { |     obs-studio = { | ||||||
|       enable = true; |       enable = true; | ||||||
|       plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi]; |       plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi]; | ||||||
| @ -190,11 +180,6 @@ in { | |||||||
|     zsh.enable = true; |     zsh.enable = true; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   xdg.configFile."nvim/init.lua" = { |  | ||||||
|     source = ./vimrc.lua; |  | ||||||
|     recursive = true; |  | ||||||
|   }; |  | ||||||
| 
 |  | ||||||
|   services = { |   services = { | ||||||
|     lorri.enable = false; |     lorri.enable = false; | ||||||
|     mako.enable = true; |     mako.enable = true; | ||||||
|  | |||||||
| @ -1,83 +1,105 @@ | |||||||
| { | { | ||||||
|   config, |   config, | ||||||
|   pkgs, |   pkgs, | ||||||
|  |   inputs, | ||||||
|   ... |   ... | ||||||
| }: { | }: { | ||||||
|   home.packages = with pkgs; [ |   home.packages = with pkgs; | ||||||
|     alejandra |     [ | ||||||
|     appimage-run |       alejandra | ||||||
|     arp-scan |       appimage-run | ||||||
|     birdtray |       arp-scan | ||||||
|     blackmagic |       birdtray | ||||||
|     btop |       blackmagic | ||||||
|     cached-nix-shell |       btop | ||||||
|     caddy |       cached-nix-shell | ||||||
|     cargo |       caddy | ||||||
|     ccls |       cargo | ||||||
|     cemu |       ccls | ||||||
|     cmake |       cemu | ||||||
|     compsize |       cmake | ||||||
|     cura |       compsize | ||||||
|     deluge |       cura | ||||||
|     ffmpeg-full |       deluge | ||||||
|     firefox |       ffmpeg-full | ||||||
|     gcc |       firefox | ||||||
|     gdb |       gcc | ||||||
|     glab |       gdb | ||||||
|     glaxnimate |       glab | ||||||
|     gnumake |       glaxnimate | ||||||
|     grim |       gnumake | ||||||
|     hyperfine |       go | ||||||
|     imagemagick |       grim | ||||||
|     imv |       hyperfine | ||||||
|     jellyfin-media-player |       imagemagick | ||||||
|     kdenlive |       imv | ||||||
|     kicad |       jellyfin-media-player | ||||||
|     kodi-wayland |       kdenlive | ||||||
|     libnotify |       kicad | ||||||
|     libreoffice |       kodi-wayland | ||||||
|     libva-utils |       libnotify | ||||||
|     mediainfo |       libreoffice | ||||||
|     ncdu |       libva-utils | ||||||
|     neovide |       mediainfo | ||||||
|     ngspice |       ncdu | ||||||
|     nix-init |       neovide | ||||||
|     nodePackages.peerflix |       ngspice | ||||||
|     pandoc |       nix-init | ||||||
|     pass |       nodePackages.peerflix | ||||||
|     patchelf |       openocd | ||||||
|     pavucontrol |       pandoc | ||||||
|     pirate-get |       pass | ||||||
|     powertop |       patchelf | ||||||
|     pulsemixer |       pavucontrol | ||||||
|     python3 |       pirate-get | ||||||
|     python3Packages.west |       powertop | ||||||
|     remmina |       pulsemixer | ||||||
|     river |       python3 | ||||||
|     rtorrent |       python3Packages.west | ||||||
|     rustc |       remmina | ||||||
|     screen |       river | ||||||
|     seer |       rtorrent | ||||||
|     sioyek |       rustc | ||||||
|     skypeforlinux |       screen | ||||||
|     slurp |       seer | ||||||
|     texlive.combined.scheme-full |       sioyek | ||||||
|     thunderbird |       skypeforlinux | ||||||
|     upx |       slurp | ||||||
|     waybar |       texlive.combined.scheme-full | ||||||
|     wdisplays |       thunderbird | ||||||
|     whatsapp-for-linux |       upx | ||||||
|     wireshark |       waybar | ||||||
|     wl-clipboard |       wdisplays | ||||||
|     wlr-randr |       whatsapp-for-linux | ||||||
|     wofi |       wireshark | ||||||
|     x2goclient |       wl-clipboard | ||||||
|     yewtube |       wlr-randr | ||||||
|     yt-dlp |       wofi | ||||||
|     zathura |       x2goclient | ||||||
|     zeal-qt6 |       yewtube | ||||||
|     zig |       yt-dlp | ||||||
|     zls |       zathura | ||||||
|     openocd |       zeal-qt6 | ||||||
|   ]; |       zig | ||||||
|  |       zls | ||||||
|  | 
 | ||||||
|  |       /* install here until nvim flake is fixed */ | ||||||
|  |       alejandra | ||||||
|  |       ccls | ||||||
|  |       gopls | ||||||
|  |       luaformatter | ||||||
|  |       nixd | ||||||
|  |       pyright | ||||||
|  |       rust-analyzer | ||||||
|  |       sumneko-lua-language-server | ||||||
|  |       svls | ||||||
|  |       texlab | ||||||
|  |       tree-sitter | ||||||
|  |       verible | ||||||
|  |       zls | ||||||
|  |     ] | ||||||
|  |     ++ [ | ||||||
|  |       inputs.swaysw.packages.x86_64-linux.swaysw | ||||||
|  |       inputs.nvim.packages.x86_64-linux.nvim | ||||||
|  |     ]; | ||||||
| } | } | ||||||
|  | |||||||
| @ -33,7 +33,7 @@ | |||||||
|       modifier = "Mod4"; |       modifier = "Mod4"; | ||||||
|       output = { |       output = { | ||||||
|         eDP-1 = { |         eDP-1 = { | ||||||
|           bg = "~/pic/weird_dragon.jpg stretch"; |           bg = "~/pic/wallpaper stretch"; | ||||||
|           /* |           /* | ||||||
|           scale = "1.4"; |           scale = "1.4"; | ||||||
|           */ |           */ | ||||||
| @ -100,7 +100,7 @@ | |||||||
|         "Alt+j" = "focus down"; |         "Alt+j" = "focus down"; | ||||||
|         "Alt+k" = "focus up"; |         "Alt+k" = "focus up"; | ||||||
|         "Alt+l" = "focus right"; |         "Alt+l" = "focus right"; | ||||||
|         "Alt+slash" = "exec lckdo /tmp/.sws_cli_lock footclient -a sws_cli -- sws_cli.sh"; |         "Alt+slash" = "exec swaysw"; | ||||||
|         "Alt+Escape" = "workspace back_and_forth"; |         "Alt+Escape" = "workspace back_and_forth"; | ||||||
|         "Alt+f" = "fullscreen enable"; |         "Alt+f" = "fullscreen enable"; | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										233
									
								
								home/vimrc.lua
									
									
									
									
									
								
							
							
						
						
									
										233
									
								
								home/vimrc.lua
									
									
									
									
									
								
							| @ -1,233 +0,0 @@ | |||||||
| -- Basic settings |  | ||||||
| vim.g.loaded_matchparen = true |  | ||||||
| vim.g.netrw_liststyle = 3 |  | ||||||
| vim.wo.number = true |  | ||||||
| 
 |  | ||||||
| local glob_opts = { |  | ||||||
| 	background = 'dark', |  | ||||||
| 	belloff = 'all', |  | ||||||
| 	breakindent = true, |  | ||||||
| 	hlsearch = false, |  | ||||||
| 	laststatus = 0, |  | ||||||
| 	lazyredraw = true, |  | ||||||
| 	showcmd = true, |  | ||||||
| 	synmaxcol = 800, |  | ||||||
| 	syntax = 'on', |  | ||||||
| 	termguicolors = true, |  | ||||||
| 	titleold = vim.fn.getcwd(), |  | ||||||
| 	title = true, |  | ||||||
| 	wildmenu = true, |  | ||||||
| 	wrap = true, |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| for option, value in pairs(glob_opts) do |  | ||||||
| 	vim.go[option] = value |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| vim.cmd([[colorscheme gruvbox]]) |  | ||||||
| 
 |  | ||||||
| require 'nvim-treesitter.configs'.setup { |  | ||||||
| 	highlight = { enable = true, disable = {} }, |  | ||||||
| 	indent = { enable = false, disable = {} }, |  | ||||||
| 	rainbow = { |  | ||||||
| 		enable = true, |  | ||||||
| 		extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean |  | ||||||
| 		max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int |  | ||||||
| 		colors = { |  | ||||||
| 			'#ff0000', '#ffa500', '#ffff00', '#008000', '#0051a0', '#8003f2' |  | ||||||
| 		} -- table of hex strings |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| -- Mappings. |  | ||||||
| -- See `:help vim.diagnostic.*` for documentation on any of the below functions |  | ||||||
| local opts = { noremap = true, silent = true } |  | ||||||
| vim.api.nvim_set_keymap('n', '<space>e', |  | ||||||
| 	'<cmd>lua vim.diagnostic.open_float()<CR>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', '<space>q', |  | ||||||
| 	'<cmd>lua vim.diagnostic.setloclist()<CR>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', 'Q', '<cmd>nohl<CR>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', 'j', 'gj', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', 'k', 'gk', opts) |  | ||||||
| vim.api.nvim_set_keymap('v', 'j', 'gj', opts) |  | ||||||
| vim.api.nvim_set_keymap('v', 'k', 'gk', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', '<C-J>', '<C-W><C-J>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', '<C-K>', '<C-W><C-K>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', '<C-L>', '<C-W><C-L>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', '<C-H>', '<C-W><C-H>', opts) |  | ||||||
| vim.api.nvim_set_keymap('n', "<C-P>", "<cmd>lua require('fzf-lua').files()<CR>", opts) |  | ||||||
| 
 |  | ||||||
| vim.api.nvim_create_autocmd('LspAttach', { |  | ||||||
| 	desc = 'LSP actions', |  | ||||||
| 	callback = function() |  | ||||||
| 		local bufmap = function(mode, lhs, rhs) |  | ||||||
| 			vim.keymap.set(mode, lhs, rhs, { buffer = true }) |  | ||||||
| 		end |  | ||||||
| 
 |  | ||||||
| 		-- Displays hover information about the symbol under the cursor |  | ||||||
| 		bufmap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Jump to the definition |  | ||||||
| 		bufmap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Jump to declaration |  | ||||||
| 		bufmap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Lists all the implementations for the symbol under the cursor |  | ||||||
| 		bufmap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Jumps to the definition of the type symbol |  | ||||||
| 		bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Lists all the references |  | ||||||
| 		bufmap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Displays a function's signature information |  | ||||||
| 		bufmap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Renames all references to the symbol under the cursor |  | ||||||
| 		bufmap('n', 'rn', '<cmd>lua vim.lsp.buf.rename()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Selects a code action available at the current cursor position |  | ||||||
| 		bufmap('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>') |  | ||||||
| 		bufmap('x', '<F4>', '<cmd>lua vim.lsp.buf.range_code_action()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Show diagnostics in a floating window |  | ||||||
| 		bufmap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Move to the previous diagnostic |  | ||||||
| 		bufmap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Move to the next diagnostic |  | ||||||
| 		bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>') |  | ||||||
| 
 |  | ||||||
| 		-- Format current buffer |  | ||||||
| 		bufmap('n', '<space>f', function() vim.lsp.buf.format { async = true } end) |  | ||||||
| 	end |  | ||||||
| }) |  | ||||||
| 
 |  | ||||||
| vim.diagnostic.config({ virtual_text = false}) -- Turn off inline diagnostics  |  | ||||||
| 
 |  | ||||||
| -- Show all diagnostics on current line in floating window |  | ||||||
| vim.api.nvim_set_keymap( 'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>', opts) |  | ||||||
| 
 |  | ||||||
| -- Go to next diagnostic (if there are multiple on the same line, only shows |  | ||||||
| -- one at a time in the floating window) |  | ||||||
| vim.api.nvim_set_keymap( 'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>', opts) |  | ||||||
| 
 |  | ||||||
| -- Go to prev diagnostic (if there are multiple on the same line, only shows |  | ||||||
| -- one at a time in the floating window) |  | ||||||
| vim.api.nvim_set_keymap( 'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>', opts) |  | ||||||
| 
 |  | ||||||
| -- Use a loop to conveniently call 'setup' on multiple servers and |  | ||||||
| -- map buffer local keybindings when the language server attaches |  | ||||||
| local cmp = require 'cmp' |  | ||||||
| cmp.setup({ |  | ||||||
| 	snippet = { |  | ||||||
| 		expand = function(args) |  | ||||||
| 			vim.fn["UltiSnips#Anon"](args.body) |  | ||||||
| 		end, |  | ||||||
| 	}, |  | ||||||
| 	sources = cmp.config.sources({ |  | ||||||
| 		{ name = 'nvim_lsp' }, |  | ||||||
| 		{ name = 'buffer' }, |  | ||||||
| 		{ name = 'path' }, |  | ||||||
| 		{ name = 'ultisnips' }, |  | ||||||
| 	}), |  | ||||||
| 	mapping = { |  | ||||||
| 		["<Tab>"] = cmp.mapping({ |  | ||||||
| 			i = function(fallback) |  | ||||||
| 				if cmp.visible() then |  | ||||||
| 					cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert }) |  | ||||||
| 				else |  | ||||||
| 					fallback() |  | ||||||
| 				end |  | ||||||
| 			end, |  | ||||||
| 		}), |  | ||||||
| 		["<S-Tab>"] = cmp.mapping({ |  | ||||||
| 			i = function(fallback) |  | ||||||
| 				if cmp.visible() then |  | ||||||
| 					cmp.select_prev_item({ behavior = cmp.SelectBehavimr.Insert }) |  | ||||||
| 				else |  | ||||||
| 					fallback() |  | ||||||
| 				end |  | ||||||
| 			end, |  | ||||||
| 		}), |  | ||||||
| 		['<Down>'] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), { 'i' }), |  | ||||||
| 		['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), { 'i' }), |  | ||||||
| 		['<C-n>'] = cmp.mapping({ |  | ||||||
| 			i = function(fallback) |  | ||||||
| 				if cmp.visible() then |  | ||||||
| 					cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) |  | ||||||
| 				else |  | ||||||
| 					fallback() |  | ||||||
| 				end |  | ||||||
| 			end |  | ||||||
| 		}), |  | ||||||
| 		['<C-p>'] = cmp.mapping({ |  | ||||||
| 			i = function(fallback) |  | ||||||
| 				if cmp.visible() then |  | ||||||
| 					cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) |  | ||||||
| 				else |  | ||||||
| 					fallback() |  | ||||||
| 				end |  | ||||||
| 			end |  | ||||||
| 		}), |  | ||||||
| 		['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), |  | ||||||
| 		['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), |  | ||||||
| 		['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), |  | ||||||
| 		['<C-e>'] = cmp.mapping({ i = cmp.mapping.close(), c = cmp.mapping.close() }), |  | ||||||
| 		['<CR>'] = cmp.mapping({ |  | ||||||
| 			i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }), |  | ||||||
| 		}), |  | ||||||
| 	} |  | ||||||
| }) |  | ||||||
| 
 |  | ||||||
| local servers = { 'pyright', 'rust_analyzer', 'ccls', 'nixd', 'texlab', 'zls' } |  | ||||||
| local capabilities = require('cmp_nvim_lsp').default_capabilities() |  | ||||||
| for _, lsp in pairs(servers) do |  | ||||||
| 	require('lspconfig')[lsp].setup { |  | ||||||
| 		capabilities = capabilities |  | ||||||
| 	} |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| require('lspconfig').lua_ls.setup({ |  | ||||||
| 	capabilities = capabilities, |  | ||||||
| 	single_file_support = true, |  | ||||||
| 	settings = { |  | ||||||
| 		Lua = { |  | ||||||
| 			diagnostics = { |  | ||||||
| 				globals = { 'vim' }, |  | ||||||
| 			}, |  | ||||||
| 			runtime = { |  | ||||||
| 				version = 'LuaJIT', |  | ||||||
| 				path = vim.split(package.path, ';'), |  | ||||||
| 			}, |  | ||||||
| 			workspace = { |  | ||||||
| 				library = { |  | ||||||
| 					[vim.fn.expand('$VIMRUNTIME/lua')] = true, |  | ||||||
| 					[vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, |  | ||||||
| 				}, |  | ||||||
| 			}, |  | ||||||
| 			telemetry = { |  | ||||||
| 				enable = false, |  | ||||||
| 			}, |  | ||||||
| 		}, |  | ||||||
| 	}, |  | ||||||
| }) |  | ||||||
| 
 |  | ||||||
| require('lspconfig').verible.setup({ |  | ||||||
| 	capabilities = capabilities, |  | ||||||
| 	root_dir = function() return vim.loop.cwd() end |  | ||||||
| }) |  | ||||||
| 
 |  | ||||||
| if vim.fn.exists('+undofile') ~= 0 then |  | ||||||
| 	local undo_dir = vim.env.HOME .. '/.config/nvim/undo' |  | ||||||
| 	if vim.fn.isdirectory(undo_dir) == 0 then vim.fn.mkdir(undo_dir, 'p') end |  | ||||||
| 	vim.o.undodir = undo_dir |  | ||||||
| 	vim.o.undofile = true |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| vim.cmd([[syntax sync minlines=100]]) |  | ||||||
| vim.cmd([[syntax sync maxlines=140]]) |  | ||||||
| @ -1,55 +0,0 @@ | |||||||
| { |  | ||||||
|   pkgs, |  | ||||||
|   vimUtils, |  | ||||||
|   fetchFromGitHub, |  | ||||||
| }: { |  | ||||||
|   extraPackages = with pkgs; [ |  | ||||||
|     ccls |  | ||||||
|     luaformatter |  | ||||||
|     nixd |  | ||||||
|     pyright |  | ||||||
|     rust-analyzer |  | ||||||
|     sumneko-lua-language-server |  | ||||||
|     svls |  | ||||||
|     texlab |  | ||||||
|     verible |  | ||||||
|     zls |  | ||||||
|   ]; |  | ||||||
| 
 |  | ||||||
|   plugins = with pkgs.vimPlugins; [ |  | ||||||
|     (nvim-treesitter.withPlugins (parsers: [ |  | ||||||
|       parsers.c |  | ||||||
|       parsers.cpp |  | ||||||
|       parsers.json |  | ||||||
|       parsers.latex |  | ||||||
|       parsers.lua |  | ||||||
|       parsers.nix |  | ||||||
|       parsers.python |  | ||||||
|       parsers.query |  | ||||||
|       parsers.rust |  | ||||||
|       parsers.verilog |  | ||||||
|       parsers.vimdoc |  | ||||||
|       parsers.zig |  | ||||||
|     ])) |  | ||||||
|     cmp-buffer |  | ||||||
|     cmp-cmdline |  | ||||||
|     cmp-nvim-lsp |  | ||||||
|     cmp-nvim-ultisnips |  | ||||||
|     cmp-path |  | ||||||
|     colorizer |  | ||||||
|     fugitive |  | ||||||
|     fzf-lua |  | ||||||
|     gruvbox |  | ||||||
|     nvim-cmp |  | ||||||
|     nvim-lspconfig |  | ||||||
|     nvim-ts-rainbow |  | ||||||
|     repeat |  | ||||||
|     targets-vim |  | ||||||
|     UltiSnips |  | ||||||
|     vim-addon-nix |  | ||||||
|     vim-signify |  | ||||||
|     vim-slime |  | ||||||
|     vim-snippets |  | ||||||
|     zig-vim |  | ||||||
|   ]; |  | ||||||
| } |  | ||||||
| @ -117,6 +117,14 @@ | |||||||
|         "OC\\Preview\\XBitmap" |         "OC\\Preview\\XBitmap" | ||||||
|       ]; |       ]; | ||||||
|     }; |     }; | ||||||
|  |     phpOptions = | ||||||
|  |       config.services.nextcloud.phpOptions.default | ||||||
|  |       // { | ||||||
|  |         "opcache.jit" = "tracing"; | ||||||
|  |         "opcache.jit_buffer_size" = "100M"; | ||||||
|  |         # recommended by nextcloud admin overview | ||||||
|  |         "opcache.interned_strings_buffer" = "16"; | ||||||
|  |       }; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   services.nginx = { |   services.nginx = { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user