Skip to content

Commit

Permalink
Ruby development stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
maiwald committed Oct 10, 2022
1 parent 40cbb66 commit 7992580
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gemrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ sources:
update_sources: true
verbose: true
concurrent_downloads: 8
gem: "--no-ri --no-rdoc --no-document"
benchmark: false
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
*.Brewfile.lock.json
*.DS_Store
*.idea
/.CFUserTextEncoding
/.aws
/.bundle/cache
/.cache
/.cargo
/.config/gh
Expand All @@ -10,21 +12,27 @@
/.cups
/.docker
/.fzf*
/.gem
/.irb_history
/.lesshst
/.local
/.m2
/.npm
/.pyenv
/.rbenv
/.solargraph
/.ssh
/.tig_history
/.vim/autoload/plug.vim
/.vim/plugged
/.vim/undo
/.viminfo
/.yarnrc
/.zcompdump
/.zprofile
/.zsh_history
/.zsh_sessions
/Applications
/Desktop
/Documents
/Downloads
Expand All @@ -34,3 +42,4 @@
/Pictures
/Public
/code
vendor/bundle
21 changes: 15 additions & 6 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ EOF
lua << EOF
require'lspconfig'.clojure_lsp.setup{}
require'lspconfig'.gopls.setup{}
require'lspconfig'.solargraph.setup{
settings = {
solargraph = {
autoformat = false,
}
}
}

local nvim_lsp = require('lspconfig')

Expand Down Expand Up @@ -184,7 +191,7 @@ end

-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { 'clojure_lsp', 'gopls' }
local servers = { 'clojure_lsp', 'gopls', 'solargraph' }
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
Expand All @@ -205,7 +212,7 @@ nnoremap <silent> <c-RightMouse> <LeftMouse><c-o>zz
lua << EOF
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = { "vim", "go", "clojure", "javascript", "html", "scss" },
ensure_installed = { "vim", "go", "clojure", "javascript", "html", "scss", "ruby"},

-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
Expand Down Expand Up @@ -369,15 +376,17 @@ set autowrite
let g:ale_linters = {
\ 'clojure': ['clj-kondo'],
\ 'javascript': ['eslint'],
\ 'typescriptreact': ['tsserver', 'eslint'],
\ 'typescriptreact': ['tsserver', 'eslint']
\}

let g:ale_fixers = {
\ 'css': ['prettier'],
\ 'go': ['gofmt'],
\ 'javascript': ['prettier'],
\ 'typescript': ['prettier'],
\ 'css': ['prettier'],
\ 'scss': ['prettier']
\ 'ruby': ['rubocop'],
\ 'scss': ['prettier'],
\ 'typescript': ['prettier']
\}

let g:ale_fix_on_save = 1
let g:ale_ruby_rubocop_executable = 'bundle'

0 comments on commit 7992580

Please sign in to comment.