diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index 9a7ad79..c0f67e5 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -33,8 +33,14 @@ map('n', 'cq', ':ccl', { desc = 'Close Quickfix' }) -- Create a vertical split map('n', 'v', ':vsplit', { desc = 'Vertical Split' }) +-- Enter the lambda λ character. +map('i', '', 'l*', { desc = 'Enter the Lambda λ Character' }) + -- Enter the lozenge ◊ character. -map('i', '', 'LZ', { desc = 'Enter the Lozenge Character' }) +map('i', '', 'LZ', { desc = 'Enter the Lozenge ◊ Character' }) + +-- Enter the function composition ∘ character. +map('i', '', 'Ob', { desc = 'Enter the Function Composition ∘ Character' }) -------------------------------------------------------------------------------- -- LSP diff --git a/.config/nvim/lua/plugin_management.lua b/.config/nvim/lua/plugin_management.lua index 5ec9fd7..91f8f4a 100644 --- a/.config/nvim/lua/plugin_management.lua +++ b/.config/nvim/lua/plugin_management.lua @@ -124,6 +124,10 @@ require("lazy").setup({ }, -- Neovim-native LSP Implementation + -- + -- Some languages are supported elsewhere via plugins that know how to + -- initialize neovim-lsp under the covers: + -- - rust (rustaceanvim) -- ------------------------------------------------------------------------- { 'neovim/nvim-lspconfig', @@ -176,6 +180,19 @@ require("lazy").setup({ -- tsserver = typescript language server, works for JS as well. lsp.tsserver.setup{} + + -- gopls = go language server + lsp.gopls.setup({ + settings = { + gopls = { + analyses = { + unusedparams = true, + }, + staticcheck = true, + gofumpt = true, + }, + }, + }) end }, @@ -324,7 +341,7 @@ require("lazy").setup({ -- ------------------------------------------------------------------------- { 'benknoble/vim-racket', - event = { 'BufNewFile *.rkt', 'BufReadPre *.rkt' }, + ft = { 'rkt' }, lazy = true, }, @@ -332,7 +349,7 @@ require("lazy").setup({ -- ------------------------------------------------------------------------- { 'bakpakin/janet.vim', - event = { 'BufNewFile *.janet', 'BufReadPre *.janet' }, + ft = { 'janet' }, lazy = true }, @@ -340,11 +357,35 @@ require("lazy").setup({ -- ------------------------------------------------------------------------- { 'aklt/plantuml-syntax', - event = { 'BufNewFile *.puml', 'BufReadPre *.puml' }, + ft = { 'puml' }, lazy = true, }, -- i3 configuration syntax -- ------------------------------------------------------------------------- 'mboughaba/i3config.vim', + + -- Golang support + -- ------------------------------------------------------------------------- + { + "ray-x/go.nvim", + dependencies = { + "ray-x/guihua.lua", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("go").setup() + end, + ft = { "go", "gomod" }, + lazy = true, + }, + + -- Rust support + -- ------------------------------------------------------------------------- + { + 'mrcjkb/rustaceanvim', + version = '^4', + ft = { 'rust' }, + }, }) diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 57638e9..47762d2 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -3,9 +3,15 @@ require'nvim-treesitter.configs'.setup { ensure_installed = { "c", "zig", "bash", "scala", "yaml", "css", "javascript", "latex", "clojure", "lua", "cpp", "hcl", "json", "ocaml", "toml", - "rust", "sql", "python", "gitcommit", "gitignore", "html" + "rust", "sql", "python", "gitcommit", "gitignore", "html", "go" }, + -- This will be populated after load. + modules = {}, + + -- Only enable if CLI treesitter is installed. + auto_install = false, + -- Install languages synchronously (only applied to `ensure_installed`) sync_install = false, diff --git a/.config/starship.toml b/.config/starship.toml index d0f005b..0819a93 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -13,11 +13,11 @@ format = '[\[ $time \]]($style) ' style = "bold #b5bd68" [directory] -read_only = " " +read_only = " 󰌾" style = "bold white" [git_branch] -symbol = " " +symbol = " " style = "bold #b294bb" [rust] @@ -33,7 +33,7 @@ symbol = " " symbol = " " [package] -symbol = " " +symbol = "󰏗 " [python] symbol = " " @@ -50,14 +50,6 @@ disabled = true symbol = " " disabled = true -[conda] -symbol = " " -disabled = true - -[dart] -symbol = " " -disabled = true - [docker_context] symbol = " " disabled = true @@ -78,10 +70,6 @@ disabled = true symbol = " " disabled = true -[hg_branch] -symbol = " " -disabled = true - [java] symbol = " " disabled = true @@ -91,19 +79,7 @@ symbol = " " disabled = true [memory_usage] -symbol = " " -disabled = true - -[meson] -symbol = "喝 " -disabled = true - -[nim] -symbol = " " -disabled = true - -[rlang] -symbol = "ﳒ " +symbol = "󰍛 " disabled = true [ruby] @@ -113,7 +89,3 @@ disabled = true [scala] symbol = " " disabled = true - -[spack] -symbol = "🅢 " -disabled = true diff --git a/.profile b/.profile index 3ee6b29..fd21f69 100644 --- a/.profile +++ b/.profile @@ -1 +1,2 @@ . "$HOME/.bashrc" +. "$HOME/.cargo/env" diff --git a/.zshrc b/.zshrc index 900c6d4..63aa623 100644 --- a/.zshrc +++ b/.zshrc @@ -4,6 +4,11 @@ export SAVEHIST=5000 local_install_dir="$HOME/.local/install" +# ============================================================================= +# Allow for menu-style tab completion. +# ============================================================================= +zstyle ':completion:*' menu select + # ============================================================================= # GPG Initialization (Ensure prompts work properly). # ============================================================================= @@ -35,7 +40,9 @@ if [ -d "$HOME/.local/bin" ]; then export PATH="$HOME/.local/bin:$PATH" fi -if [ -d "$HOME/.cargo/bin" ]; then +if [ -f "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +elif [ -d "$HOME/.cargo/bin" ]; then export PATH="$HOME/.cargo/bin:$PATH" fi @@ -53,6 +60,13 @@ if [ -d "$COURSIER_HOME/bin" ]; then export PATH="$COURSIER_HOME/bin:$PATH" fi +export GO_HOME="$local_install_dir/go" +if [ -d "$GO_HOME/bin" ]; then + export PATH="$GO_HOME/bin:$PATH" + export GOPATH="$HOME/.local/go" + export PATH="$GOPATH/bin:$PATH" +fi + export N_PREFIX="$HOME/.n" if [ -d "$N_PREFIX/bin" ]; then export PATH="$N_PREFIX/bin:$PATH" @@ -133,6 +147,11 @@ autoload -Uz compinit && compinit # ============================================================================= [[ ! -r /home/pfm/.opam/opam-init/init.zsh ]] || source /home/pfm/.opam/opam-init/init.zsh > /dev/null 2> /dev/null +# ============================================================================= +# Haskell Setup +# ============================================================================= +[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" + # ============================================================================= # Initialize Starship # =============================================================================