diff --git a/home-programs/alacritty.nix b/home-programs/alacritty.nix new file mode 100644 index 0000000..516d859 --- /dev/null +++ b/home-programs/alacritty.nix @@ -0,0 +1,23 @@ +{ ... }: { + programs.alacritty = { + enable = true; + theme = "catppuccin_frappe"; + + settings = { + terminal.shell = "fish"; + + font = { + normal.family = "UbuntuMono Nerd Font"; + italic.family = "UbuntuMono Nerd Font"; + bold.family = "UbuntuMono Nerd Font"; + size = 16; + }; + + window = { + decorations = "full"; + opacity = 1; + }; + }; + + }; +} diff --git a/home-programs/firefox.nix b/home-programs/firefox.nix new file mode 100644 index 0000000..c516669 --- /dev/null +++ b/home-programs/firefox.nix @@ -0,0 +1,187 @@ +{ + config, + inputs, + pkgs, + ... +}: +{ + # Configure firefox to be resilient against reboot + # Source = https://github.com/johnmpost/nixos-config + programs.firefox = { + enable = true; + + configPath = "${config.xdg.configHome}/mozilla/firefox"; + + profiles.roy = { + search = { + force = true; + default = "ddgc"; + privateDefault = "ddgc"; + engines = { + bing.metaData.hidden = true; + ddg.metaData.hidden = true; + google.metaData.hidden = true; + wikipedia.metaData.hidden = true; + amazon.metaData.hidden = true; + ebay.metaData.hidden = true; + ddgc = { + name = "DuckDuckGo (unthemed)"; + urls = [ { template = "https://duckduckgo.com/?q={searchTerms}"; } ]; + icon = "https://duckduckgo.com/favicon.ico"; + }; + }; + }; + + extensions.force = true; + extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + ublock-origin + vimium-c + ]; + extensions.settings."uBlock0@raymondhill.net".settings = { + selectedFilterLists = [ + "ublock-filters" + "ublock-badware" + "ublock-privacy" + "ublock-quick-fixes" + "ublock-unbreak" + "easylist-chat" + "easylist-newsletters" + "easylist-notifications" + "easylist-annoyances" + "adguard-mobile-app-banners" + "adguard-other-annoyances" + "adguard-popup-overlays" + "adguard-widgets" + "ublock-annoyances" + ]; + }; + + settings = { + # don't force manual enablement of extensions on first launch + "extensions.autoDisableScopes" = 0; + "browser.urlbar.shortcuts.bookmarks" = false; + "browser.urlbar.shortcuts.history" = false; + "browser.urlbar.shortcuts.tabs" = false; + "browser.aboutConfig.showWarning" = false; + "dom.security.https_only_mode" = true; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.pbmode.enabled" = true; + "privacy.donottrackheader.enabled" = true; + "signon.rememberSignons" = false; + "extensions.formautofill.creditCards.enabled" = false; + "extensions.formautofill.addresses.enabled" = false; + "browser.urlbar.suggest.quicksuggest.sponsored" = false; + # hide weather on new tab page + "browser.newtabpage.activity-stream.showWeather" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.toolbars.bookmarks.visibility" = "never"; + # set default download dir (to avoid Download dir creation) + "browser.download.dir" = "/home/roy/dl"; + "browser.download.useDownloadDir" = false; + "browser.download.folderList" = 2; + "full-screen-api.ignore-widgets" = true; + "browser.tabs.firefox-view" = false; + "browser.gesture.swipe.left" = ""; + "browser.gesture.swipe.right" = ""; + "pdfjs.sidebarViewOnLoad" = 0; + "identity.fxaccounts.enabled" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.uitour.enabled" = false; + "toolkit.telemetry.enabled" = false; + # don't show about:welcome or privacy page on first launch + "browser.aboutwelcome.enabled" = false; + "datareporting.policy.dataSubmissionPolicyBypassNotification" = true; + # disable pocket + "extensions.pocket.enabled" = false; + # keep window open when closing all tabs + "browser.tabs.closeWindowWithLastTab" = false; + # allegedly disable addon recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; + # allegedly disable feature recommendations + "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; + # don't show "open previous tabs?" toolbar, hopefully still allow functionality + "browser.startup.couldRestoreSession.count" = -1; + }; + + bookmarks.force = true; + bookmarks.settings = [ + { + name = "google search"; + url = "https://www.google.com/search?q=%s"; + keyword = "g"; + } + { + name = "youtube search"; + url = "https://www.youtube.com/results?search_query=%s"; + keyword = "yt"; + } + { + name = "wikipedia search"; + url = "https://en.wikipedia.org/wiki/Special:Search?search=%s"; + keyword = "w"; + } + { + name = "dictionary search"; + url = "https://www.wordnik.com/words/%s"; + keyword = "d"; + } + { + name = "github go to repo"; + url = "https://github.com/RoyDumblauskas/%s"; + keyword = "repo"; + } + { + name = "chatgpt"; + url = "https://chatgpt.com"; + keyword = "chat"; + } + { + name = "github my repos"; + url = "https://github.com/RoyDumblauskas?tab=repositories"; + keyword = "repos"; + } + { + name = "github profile"; + url = "https://github.com/RoyDumblauskas"; + keyword = "gh"; + } + { + name = "drive 0"; + url = "https://drive.google.com/drive/u/0/folders/1hMAgupSZvhAml0K1WhBi9sNINfvkhw0e"; + keyword = "d0"; + } + { + name = "drive 1"; + url = "https://drive.google.com/drive/u/1"; + keyword = "d1"; + } + { + name = "mail 1"; + url = "https://mail.google.com/mail/u/1"; + keyword = "m1"; + } + { + name = "mail 0"; + url = "https://mail.google.com/mail/u/0"; + keyword = "m0"; + } + { + name = "discord"; + url = "https://discord.com/app"; + keyword = "dis"; + } + { + name = "downloads"; + url = "file:///home/roy/dl/%s"; + keyword = "dl"; + } + { + name = "nix package search"; + url = "https://search.nixos.org/packages?channel=unstable&query=%s"; + keyword = "nixp"; + } + ]; + }; + }; +} diff --git a/home-programs/fish.nix b/home-programs/fish.nix new file mode 100644 index 0000000..10ceb45 --- /dev/null +++ b/home-programs/fish.nix @@ -0,0 +1,79 @@ +{ ... }: { + programs.fish = { + enable = true; + + functions.fish_greeting = ""; + functions.fish_prompt = '' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " + ''; + + functions.prompt_pwd = '' + set -l options h/help d/dir-length= D/full-length-dirs= + argparse -n prompt_pwd $options -- $argv + or return + + if set -q _flag_help + __fish_print_help prompt_pwd + return 0 + end + + set -q argv[1] + or set argv $PWD + + set -ql _flag_d + and set -l fish_prompt_pwd_dir_length $_flag_d + + set -q fish_prompt_pwd_dir_length + or set -l fish_prompt_pwd_dir_length 1 + + set -l fulldirs 0 + set -ql _flag_D + and set -l fish_prompt_pwd_full_dirs $_flag_D + + set -q fish_prompt_pwd_full_dirs + or set -l fish_prompt_pwd_full_dirs 1 + + for path in $argv + # Replace $HOME with "~" + set -l realhome (string escape --style=regex -- ~) + set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path) + + set -l full + set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp) + set tmp $all[1] + set full $all[2..] + + string join / -- (string replace -ar -- '(\.?[^/]{'"100"'})[^/]*/' '$1/' $tmp) $full + end + ''; + }; + +} diff --git a/home-programs/git.nix b/home-programs/git.nix new file mode 100644 index 0000000..ec22a51 --- /dev/null +++ b/home-programs/git.nix @@ -0,0 +1,9 @@ +{ ... }: { + programs.git = { + enable = true; + settings = { + user.name = "Roy Dumblauskas"; + user.email = "roydumblauskas@gmail.com"; + }; + }; +} diff --git a/home-programs/nixvim.nix b/home-programs/nixvim.nix new file mode 100644 index 0000000..084bbc8 --- /dev/null +++ b/home-programs/nixvim.nix @@ -0,0 +1,206 @@ +{ ... }: { + # Configure nixvim + programs.nixvim = { + enable = true; + globals.mapleader = " "; + + opts = { + number = true; + shiftwidth = 2; + tabstop = 2; + expandtab = true; + }; + + clipboard.register = "unnamedplus"; + + keymaps = [ + { + action = "Neotree toggle"; + key = "b"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Toggle Neotree"; + } + { + action = "h"; + key = "h"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus left"; + } + { + action = "l"; + key = "l"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus right"; + } + { + action = "j"; + key = "j"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus down"; + } + { + action = "k"; + key = "k"; + mode = [ "n" ]; + options.silent = true; + options.desc = "Focus up"; + } + ]; + + plugins = { + lualine.enable = true; + lsp-lines.enable = true; + lsp-format.enable = true; + + lsp = { + enable = true; + inlayHints = true; + + servers = { + html.enable = true; + lua_ls.enable = true; + nil_ls.enable = true; + ts_ls.enable = true; + marksman.enable = true; + pyright.enable = true; + gopls.enable = true; + terraformls.enable = true; + jsonls.enable = true; + yamlls.enable = true; + + rust_analyzer = { + enable = true; + installRustc = true; + installCargo = true; + settings = { + cargo = { + features = "all"; + }; + }; + }; + }; + + keymaps = { + silent = true; + + lspBuf = { + gd = { + action = "definition"; + desc = "Goto Definition"; + }; + + gr = { + action = "references"; + desc = "Goto References"; + }; + + gD = { + action = "declaration"; + desc = "Goto Declaration"; + }; + + gI = { + action = "implementation"; + desc = "Goto Implementation"; + }; + + gT = { + action = "type_definition"; + desc = "Type Definition"; + }; + + K = { + action = "hover"; + desc = "Hover"; + }; + + "cw" = { + action = "workspace_symbol"; + desc = "Workspace Symbol"; + }; + + "r" = { + action = "rename"; + desc = "Rename"; + }; + }; + + diagnostic = { + "cd" = { + action = "open_float"; + desc = "Line Diagnostics"; + }; + + "]d" = { + action = "goto_next"; + desc = "Next Diagnostic"; + }; + + "[d" = { + action = "goto_prev"; + desc = "Previous Diagnostic"; + }; + }; + }; + }; + + neo-tree = { + enable = true; + }; + + # neo-tree dependency + web-devicons.enable = true; + + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + { name = "luasnip"; } + ]; + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + }; + }; + }; + extraConfigLua = '' + local _border = "rounded" + + vim.lsp.config('*', { + handlers = { + ["textDocument/hover"] = { + border = _border, + }, + ["textDocument/signatureHelp"] = { + border = _border, + }, + }, + }) + + vim.diagnostic.config({ + float = { + border = _border, + }, + }) + ''; + + colorschemes.catppuccin = { + enable = true; + settings.flavour = "frappe"; + }; + }; +} diff --git a/home.nix b/home.nix index fff3987..730497a 100755 --- a/home.nix +++ b/home.nix @@ -6,6 +6,12 @@ }: { + imports = [ + ./home-programs/fish.nix + ./home-programs/git.nix + ./home-programs/nixvim.nix + ./home-programs/firefox.nix + ]; home.username = "roy"; home.homeDirectory = "/home/roy"; @@ -44,114 +50,6 @@ zip ]; - # MOVE TO IT's OWN PLACE - programs.fish = { - enable = true; - - functions.fish_greeting = ""; - functions.fish_prompt = '' - set -l last_pipestatus $pipestatus - set -lx __fish_last_status $status # Export for __fish_print_pipestatus. - set -l normal (set_color normal) - set -q fish_color_status - or set -g fish_color_status red - - # Color the prompt differently when we're root - set -l color_cwd $fish_color_cwd - set -l suffix '>' - if functions -q fish_is_root_user; and fish_is_root_user - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - end - set suffix '#' - end - - # Write pipestatus - # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. - set -l bold_flag --bold - set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation - if test $__fish_prompt_status_generation = $status_generation - set bold_flag - end - set __fish_prompt_status_generation $status_generation - set -l status_color (set_color $fish_color_status) - set -l statusb_color (set_color $bold_flag $fish_color_status) - set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) - - echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " - ''; - - functions.prompt_pwd = '' - set -l options h/help d/dir-length= D/full-length-dirs= - argparse -n prompt_pwd $options -- $argv - or return - - if set -q _flag_help - __fish_print_help prompt_pwd - return 0 - end - - set -q argv[1] - or set argv $PWD - - set -ql _flag_d - and set -l fish_prompt_pwd_dir_length $_flag_d - - set -q fish_prompt_pwd_dir_length - or set -l fish_prompt_pwd_dir_length 1 - - set -l fulldirs 0 - set -ql _flag_D - and set -l fish_prompt_pwd_full_dirs $_flag_D - - set -q fish_prompt_pwd_full_dirs - or set -l fish_prompt_pwd_full_dirs 1 - - for path in $argv - # Replace $HOME with "~" - set -l realhome (string escape --style=regex -- ~) - set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $path) - - set -l full - set -l all (string split -m (math $fish_prompt_pwd_full_dirs - 1) -r / $tmp) - set tmp $all[1] - set full $all[2..] - - string join / -- (string replace -ar -- '(\.?[^/]{'"100"'})[^/]*/' '$1/' $tmp) $full - end - ''; - }; - - programs.git = { - enable = true; - settings = { - user.name = "Roy Dumblauskas"; - user.email = "roydumblauskas@gmail.com"; - }; - }; - - programs.alacritty = { - enable = true; - theme = "catppuccin_frappe"; - - settings = { - terminal.shell = "fish"; - - font = { - normal.family = "UbuntuMono Nerd Font"; - italic.family = "UbuntuMono Nerd Font"; - bold.family = "UbuntuMono Nerd Font"; - size = 16; - }; - - window = { - decorations = "full"; - opacity = 1; - }; - }; - - }; - # user program config files home.file = { ".config/hypr".source = ./roy-config/hypr; @@ -186,391 +84,6 @@ # User services must come after sops secrets systemd.user.services.mbsync.unitConfig.After = [ "sops-nix.service" ]; - # Configure firefox to be resilient against reboot - # Source = https://github.com/johnmpost/nixos-config - programs.firefox = { - enable = true; - - configPath = "${config.xdg.configHome}/mozilla/firefox"; - - profiles.roy = { - search = { - force = true; - default = "ddgc"; - privateDefault = "ddgc"; - engines = { - bing.metaData.hidden = true; - ddg.metaData.hidden = true; - google.metaData.hidden = true; - wikipedia.metaData.hidden = true; - amazon.metaData.hidden = true; - ebay.metaData.hidden = true; - ddgc = { - name = "DuckDuckGo (unthemed)"; - urls = [ { template = "https://duckduckgo.com/?q={searchTerms}"; } ]; - icon = "https://duckduckgo.com/favicon.ico"; - }; - }; - }; - - extensions.force = true; - extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ - ublock-origin - vimium-c - ]; - extensions.settings."uBlock0@raymondhill.net".settings = { - selectedFilterLists = [ - "ublock-filters" - "ublock-badware" - "ublock-privacy" - "ublock-quick-fixes" - "ublock-unbreak" - "easylist-chat" - "easylist-newsletters" - "easylist-notifications" - "easylist-annoyances" - "adguard-mobile-app-banners" - "adguard-other-annoyances" - "adguard-popup-overlays" - "adguard-widgets" - "ublock-annoyances" - ]; - }; - - settings = { - # don't force manual enablement of extensions on first launch - "extensions.autoDisableScopes" = 0; - "browser.urlbar.shortcuts.bookmarks" = false; - "browser.urlbar.shortcuts.history" = false; - "browser.urlbar.shortcuts.tabs" = false; - "browser.aboutConfig.showWarning" = false; - "dom.security.https_only_mode" = true; - "privacy.trackingprotection.enabled" = true; - "privacy.trackingprotection.pbmode.enabled" = true; - "privacy.donottrackheader.enabled" = true; - "signon.rememberSignons" = false; - "extensions.formautofill.creditCards.enabled" = false; - "extensions.formautofill.addresses.enabled" = false; - "browser.urlbar.suggest.quicksuggest.sponsored" = false; - # hide weather on new tab page - "browser.newtabpage.activity-stream.showWeather" = false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.feeds.topsites" = false; - "browser.toolbars.bookmarks.visibility" = "never"; - # set default download dir (to avoid Download dir creation) - "browser.download.dir" = "/home/roy/dl"; - "browser.download.useDownloadDir" = false; - "browser.download.folderList" = 2; - "full-screen-api.ignore-widgets" = true; - "browser.tabs.firefox-view" = false; - "browser.gesture.swipe.left" = ""; - "browser.gesture.swipe.right" = ""; - "pdfjs.sidebarViewOnLoad" = 0; - "identity.fxaccounts.enabled" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.uitour.enabled" = false; - "toolkit.telemetry.enabled" = false; - # don't show about:welcome or privacy page on first launch - "browser.aboutwelcome.enabled" = false; - "datareporting.policy.dataSubmissionPolicyBypassNotification" = true; - # disable pocket - "extensions.pocket.enabled" = false; - # keep window open when closing all tabs - "browser.tabs.closeWindowWithLastTab" = false; - # allegedly disable addon recommendations - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; - # allegedly disable feature recommendations - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; - # don't show "open previous tabs?" toolbar, hopefully still allow functionality - "browser.startup.couldRestoreSession.count" = -1; - }; - - bookmarks.force = true; - bookmarks.settings = [ - { - name = "google search"; - url = "https://www.google.com/search?q=%s"; - keyword = "g"; - } - { - name = "youtube search"; - url = "https://www.youtube.com/results?search_query=%s"; - keyword = "yt"; - } - { - name = "wikipedia search"; - url = "https://en.wikipedia.org/wiki/Special:Search?search=%s"; - keyword = "w"; - } - { - name = "dictionary search"; - url = "https://www.wordnik.com/words/%s"; - keyword = "d"; - } - { - name = "github go to repo"; - url = "https://github.com/RoyDumblauskas/%s"; - keyword = "repo"; - } - { - name = "chatgpt"; - url = "https://chatgpt.com"; - keyword = "chat"; - } - { - name = "github my repos"; - url = "https://github.com/RoyDumblauskas?tab=repositories"; - keyword = "repos"; - } - { - name = "github profile"; - url = "https://github.com/RoyDumblauskas"; - keyword = "gh"; - } - { - name = "drive 0"; - url = "https://drive.google.com/drive/u/0/folders/1hMAgupSZvhAml0K1WhBi9sNINfvkhw0e"; - keyword = "d0"; - } - { - name = "drive 1"; - url = "https://drive.google.com/drive/u/1"; - keyword = "d1"; - } - { - name = "mail 1"; - url = "https://mail.google.com/mail/u/1"; - keyword = "m1"; - } - { - name = "mail 0"; - url = "https://mail.google.com/mail/u/0"; - keyword = "m0"; - } - { - name = "discord"; - url = "https://discord.com/app"; - keyword = "dis"; - } - { - name = "downloads"; - url = "file:///home/roy/dl/%s"; - keyword = "dl"; - } - { - name = "nix package search"; - url = "https://search.nixos.org/packages?channel=unstable&query=%s"; - keyword = "nixp"; - } - ]; - }; - }; - - # Configure nixvim - programs.nixvim = { - enable = true; - globals.mapleader = " "; - - opts = { - number = true; - shiftwidth = 2; - tabstop = 2; - expandtab = true; - }; - - clipboard.register = "unnamed"; - - keymaps = [ - { - action = "Neotree toggle"; - key = "b"; - mode = [ "n" ]; - options.silent = true; - options.desc = "Toggle Neotree"; - } - { - action = "h"; - key = "h"; - mode = [ "n" ]; - options.silent = true; - options.desc = "Focus left"; - } - { - action = "l"; - key = "l"; - mode = [ "n" ]; - options.silent = true; - options.desc = "Focus right"; - } - { - action = "j"; - key = "j"; - mode = [ "n" ]; - options.silent = true; - options.desc = "Focus down"; - } - { - action = "k"; - key = "k"; - mode = [ "n" ]; - options.silent = true; - options.desc = "Focus up"; - } - ]; - - plugins = { - lualine.enable = true; - lsp-lines.enable = true; - lsp-format.enable = true; - - lsp = { - enable = true; - inlayHints = true; - - servers = { - html.enable = true; - lua_ls.enable = true; - nil_ls.enable = true; - ts_ls.enable = true; - marksman.enable = true; - pyright.enable = true; - gopls.enable = true; - terraformls.enable = true; - jsonls.enable = true; - yamlls.enable = true; - - rust_analyzer = { - enable = true; - installRustc = true; - installCargo = true; - settings = { - cargo = { - features = "all"; - }; - }; - }; - }; - - keymaps = { - silent = true; - - lspBuf = { - gd = { - action = "definition"; - desc = "Goto Definition"; - }; - - gr = { - action = "references"; - desc = "Goto References"; - }; - - gD = { - action = "declaration"; - desc = "Goto Declaration"; - }; - - gI = { - action = "implementation"; - desc = "Goto Implementation"; - }; - - gT = { - action = "type_definition"; - desc = "Type Definition"; - }; - - K = { - action = "hover"; - desc = "Hover"; - }; - - "cw" = { - action = "workspace_symbol"; - desc = "Workspace Symbol"; - }; - - "r" = { - action = "rename"; - desc = "Rename"; - }; - }; - - diagnostic = { - "cd" = { - action = "open_float"; - desc = "Line Diagnostics"; - }; - - "]d" = { - action = "goto_next"; - desc = "Next Diagnostic"; - }; - - "[d" = { - action = "goto_prev"; - desc = "Previous Diagnostic"; - }; - }; - }; - }; - - neo-tree = { - enable = true; - }; - - # neo-tree dependency - web-devicons.enable = true; - - cmp = { - enable = true; - autoEnableSources = true; - settings = { - sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - { name = "luasnip"; } - ]; - mapping = { - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.close()"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.confirm({ select = true })"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - }; - }; - }; - }; - extraConfigLua = '' - local _border = "rounded" - - vim.lsp.config('*', { - handlers = { - ["textDocument/hover"] = { - border = _border, - }, - ["textDocument/signatureHelp"] = { - border = _border, - }, - }, - }) - - vim.diagnostic.config({ - float = { - border = _border, - }, - }) - ''; - - colorschemes.catppuccin = { - enable = true; - settings.flavour = "frappe"; - }; - }; - home.stateVersion = "24.11"; programs.home-manager.enable = true;