Minor updates and switching to Starship
This commit is contained in:
parent
e742161af3
commit
a556b95829
4 changed files with 17 additions and 35 deletions
|
@ -1,7 +1,7 @@
|
||||||
local lsp = require('lspconfig')
|
local lsp = require('lspconfig')
|
||||||
|
|
||||||
-- Use an on_attach function to configure after LSP attaches to buffer
|
-- Use an on_attach function to configure after LSP attaches to buffer
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
end
|
end
|
||||||
|
@ -10,7 +10,7 @@ end
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
||||||
-- Add nvim-cmp support to the capabilities.
|
-- Add nvim-cmp support to the capabilities.
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
-- zls = zig language server
|
-- zls = zig language server
|
||||||
lsp.zls.setup {
|
lsp.zls.setup {
|
||||||
|
@ -55,3 +55,6 @@ lsp.texlab.setup{}
|
||||||
|
|
||||||
-- terraform-ls = terraform language server (Hashicorp stable)
|
-- terraform-ls = terraform language server (Hashicorp stable)
|
||||||
lsp.terraformls.setup{}
|
lsp.terraformls.setup{}
|
||||||
|
|
||||||
|
-- tsserver = typescript language server, works for JS as well.
|
||||||
|
lsp.tsserver.setup{}
|
||||||
|
|
|
@ -15,11 +15,9 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||||
local metals_config = require('metals').bare_config()
|
local metals_config = require('metals').bare_config()
|
||||||
|
|
||||||
-- Capabilities for completion.
|
-- Capabilities for completion.
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
|
||||||
|
|
||||||
metals_config.settings = {
|
metals_config.settings = {
|
||||||
serverVersion = "0.11.8+167-188f3c7c-SNAPSHOT",
|
|
||||||
showImplicitArguments = true,
|
showImplicitArguments = true,
|
||||||
showInferredType = true,
|
showInferredType = true,
|
||||||
superMethodLensesEnabled = false
|
superMethodLensesEnabled = false
|
||||||
|
@ -30,7 +28,7 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||||
-- status bar somehow."
|
-- status bar somehow."
|
||||||
metals_config.init_options.statusBarProvider = 'on'
|
metals_config.init_options.statusBarProvider = 'on'
|
||||||
|
|
||||||
metals_config.capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
metals_config.capabilities = capabilities
|
||||||
require('metals').initialize_or_attach(metals_config)
|
require('metals').initialize_or_attach(metals_config)
|
||||||
end,
|
end,
|
||||||
group = nvim_metals_group,
|
group = nvim_metals_group,
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ metals.sbt
|
||||||
.metals/
|
.metals/
|
||||||
zig-cache/
|
zig-cache/
|
||||||
zig-out/
|
zig-out/
|
||||||
|
jsconfig.json
|
||||||
|
|
38
.zshrc
38
.zshrc
|
@ -1,31 +1,4 @@
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
ZSH_THEME="spaceship"
|
|
||||||
SPACESHIP_TIME_SHOW=true
|
|
||||||
SPACESHIP_TIME_FORMAT="%D{%D %r}"
|
|
||||||
SPACESHIP_HG_SHOW=false
|
|
||||||
SPACESHIP_HG_BRANCH_SHOW=false
|
|
||||||
SPACESHIP_HG_STATUS_SHOW=false
|
|
||||||
SPACESHIP_XCODE_SHOW_LOCAL=false
|
|
||||||
SPACESHIP_SWIFT_SHOW_LOCAL=false
|
|
||||||
SPACESHIP_PHP_SHOW=false
|
|
||||||
SPACESHIP_AWS_SHOW=false
|
|
||||||
SPACESHIP_GCLOUD_SHOW=false
|
|
||||||
SPACESHIP_CONDA_SHOW=false
|
|
||||||
SPACESHIP_DOTNET_SHOW=false
|
|
||||||
SPACESHIP_EMBER_SHOW=false
|
|
||||||
SPACESHIP_BATTERY_SHOW=false
|
|
||||||
|
|
||||||
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE=true
|
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
|
||||||
# much, much faster.
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
plugins=(gitfast vi-mode)
|
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Personalized Logging for Shell Setup
|
# Personalized Logging for Shell Setup
|
||||||
|
@ -43,7 +16,8 @@ fi
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Common Environment Configuration
|
# Common Environment Configuration
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
export EDITOR=nvim
|
# Note: use vim here so that if Neovim isn't setup, we gracefully fall back.
|
||||||
|
export EDITOR=vim
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# PATH
|
# PATH
|
||||||
|
@ -89,6 +63,11 @@ if [ -d "$N_PREFIX/bin" ]; then
|
||||||
export PATH="$N_PREFIX/bin:$PATH"
|
export PATH="$N_PREFIX/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export GO_HOME="$HOME/go"
|
||||||
|
if [ -d "$GO_HOME/bin" ]; then
|
||||||
|
export PATH="$GO_HOME/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# SSH Agent Management
|
# SSH Agent Management
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
@ -130,6 +109,7 @@ if command -v sbt > /dev/null 2>&1; then
|
||||||
export SBT_OPTS="-XX:+UseG1GC -Xmx2048m"
|
export SBT_OPTS="-XX:+UseG1GC -Xmx2048m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Enable Command Syntax Highlighting
|
# Enable Command Syntax Highlighting
|
||||||
# This must be the last item in this file.
|
# This must be the last item in this file.
|
||||||
|
|
Loading…
Add table
Reference in a new issue