Some shell fix up, vim tweaks, new language support.

This commit is contained in:
Pat Garrity 2024-03-25 21:54:26 -05:00
parent fabebae02d
commit ff26c39b20
Signed by: pfm
GPG key ID: 5CA5D21BAB7F3A76
6 changed files with 83 additions and 38 deletions

View file

@ -33,8 +33,14 @@ map('n', '<leader>cq', ':ccl<CR>', { desc = 'Close Quickfix' })
-- Create a vertical split
map('n', '<leader>v', ':vsplit<CR>', { desc = 'Vertical Split' })
-- Enter the lambda λ character.
map('i', '<C-l>', '<C-k>l*', { desc = 'Enter the Lambda λ Character' })
-- Enter the lozenge ◊ character.
map('i', '<C-l>', '<C-k>LZ', { desc = 'Enter the Lozenge Character' })
map('i', '<C-L>', '<C-k>LZ', { desc = 'Enter the Lozenge ◊ Character' })
-- Enter the function composition ∘ character.
map('i', '<C-o>', '<C-k>Ob', { desc = 'Enter the Function Composition ∘ Character' })
--------------------------------------------------------------------------------
-- LSP

View file

@ -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' },
},
})

View file

@ -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,

View file

@ -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

View file

@ -1 +1,2 @@
. "$HOME/.bashrc"
. "$HOME/.cargo/env"

21
.zshrc
View file

@ -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
# =============================================================================