darwin configuration and improvements to ruby lsp setup

This commit is contained in:
Haak Saxberg 2020-12-18 17:03:27 -08:00
parent 99307054bf
commit d9c2e63e22
2 changed files with 42 additions and 11 deletions

View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages =
[
pkgs.firefox
];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
# Create /etc/bashrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}

View file

@ -59,7 +59,6 @@ in {
nnn nnn
tree tree
ripgrep ripgrep
vlc
zsh-autosuggestions zsh-autosuggestions
zsh-history-substring-search zsh-history-substring-search
zsh-syntax-highlighting zsh-syntax-highlighting
@ -68,6 +67,7 @@ in {
] else [ ] else [
calibre calibre
slack slack
vlc
]); ]);
programs.direnv = { programs.direnv = {
@ -121,7 +121,7 @@ in {
initExtra = mkForce ('' initExtra = mkForce (''
export LOCALE_ARCHIVE="/usr/lib/locale/locale-archive" export LOCALE_ARCHIVE="/usr/lib/locale/locale-archive"
export NIX_PATH=$HOME/.nix-defexpr/channels:$NIX_PATH export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels:$NIX_PATH
export EDITOR=vim export EDITOR=vim
source $HOME/.nix-profile/etc/profile.d/nix.sh source $HOME/.nix-profile/etc/profile.d/nix.sh
@ -154,11 +154,6 @@ in {
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
''); '');
shellAliases = {
n = "neuron new";
ns = "neuron search -a";
};
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
theme = "typewritten"; theme = "typewritten";
@ -204,11 +199,16 @@ in {
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-sensible vim-sensible
vim-startify vim-startify
vim-elixir
alchemist-vim alchemist-vim
vimtex vimtex
vim-elixir
vim-elm-syntax vim-elm-syntax
vim-nix vim-nix
vim-javascript
vim-json
vim-jsx-pretty
vim-airline vim-airline
rainbow rainbow
vim-signify vim-signify
@ -216,7 +216,6 @@ in {
vim-surround vim-surround
fugitive fugitive
easymotion easymotion
tagbar
vinegar vinegar
undotree undotree
vim-test vim-test
@ -244,10 +243,14 @@ in {
\ 'javascript.jsx': ['prettier'], \ 'javascript.jsx': ['prettier'],
\ 'javascriptreact': ['prettier'], \ 'javascriptreact': ['prettier'],
\ 'typescriptreact': ['prettier'], \ 'typescriptreact': ['prettier'],
\ 'ruby': [], \ 'ruby': ['sorbet'],
\ 'rust': ['rustfmt'], \ 'rust': ['rustfmt'],
\ 'elixir': ['mix_format'] \ 'elixir': ['mix_format']
\} \}
let g:ale_linters_ignore = {
\ 'javascript': ['tsserver'],
\ 'javascriptreact': ['tsserver'],
\}
" Easymotion " Easymotion
map / <Plug>(easymotion-sn) map / <Plug>(easymotion-sn)
@ -282,11 +285,13 @@ in {
\ 'javascript.jsx': ['flow', 'lsp'], \ 'javascript.jsx': ['flow', 'lsp'],
\ 'javascriptreact': ['flow', 'lsp'], \ 'javascriptreact': ['flow', 'lsp'],
\ 'rust': ['rustup', 'run', 'stable', 'rls'], \ 'rust': ['rustup', 'run', 'stable', 'rls'],
\ 'ruby': ['bundle', 'exec', 'srb', 'tc', '--lsp', '.'],
\ } \ }
let g:LanguageClient_rootMarkers = { let g:LanguageClient_rootMarkers = {
\ 'elm': ['elm.json'], \ 'elm': ['elm.json'],
\ 'typescriptreact': ['tsconfig.json'], \ 'typescriptreact': ['tsconfig.json'],
\ 'ruby': ['Gemfile'],
\ } \ }
let g:LanguageClient_loggingFile = expand('~/.local/share/nvim/LanguageClient.log') let g:LanguageClient_loggingFile = expand('~/.local/share/nvim/LanguageClient.log')
@ -398,7 +403,7 @@ in {
defaultCommand = "rg --no-ignore --follow --files --hidden --smart-case --glob \\\"!.git/*\\\""; defaultCommand = "rg --no-ignore --follow --files --hidden --smart-case --glob \\\"!.git/*\\\"";
}; };
services.lorri.enable = !pkgs.stdenv.isDarwin; # services.lorri.enable = !pkgs.stdenv.isDarwin;
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;