Skip to content

Commit

Permalink
rescript lang server hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
danwetherald committed Nov 30, 2020
1 parent 0ae8d01 commit 0b9cd04
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hammerspoon/brightness.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function appChanged(appName, eventType, appObject)
if hour > 18 or hour < 7 then
if (eventType == hs.application.watcher.activated) then
if (appName == "kitty") then
hs.brightness.set(35)
-- hs.brightness.set(30)
else
hs.brightness.set(1)
-- hs.brightness.set(1)
end
end
end
Expand Down
13 changes: 11 additions & 2 deletions nvim/coc-settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"coc.preferences.extensionUpdateCheck": "daily",
"coc.preferences.messageLevel": "error",
"suggest.enablePreview": true,
"codeLens.enable": false,
Expand All @@ -14,7 +15,7 @@
"diagnostic.infoSign": "",
"diagnostic.hintSign": "",
"git.addGBlameToBufferVar": true,
"graphql.filetypes": ["graphql", "javascript", "javascriptreact", "typescript", "typescriptreact", "reason", "graphqls"],
"graphql.filetypes": ["graphql", "javascript", "javascriptreact", "typescript", "typescriptreact", "graphqls"],
"graphql.watcherPattern": "**/*.{graphql,gql,graphqls}",
"coc.preferences.formatOnSaveFiletypes": [
"yaml",
Expand All @@ -24,7 +25,6 @@
"typescriptreact",
"javascriptreact",
"reason",
"rescript",
"ruby",
"graphql",
"go"
Expand Down Expand Up @@ -76,6 +76,15 @@
}
},
"editor.snippetSuggestions": "top",
"languageserver": {
"rescript": {
"enable": true,
"module": "~/dotfiles/nvim/lang_servers/rescript-vscode/server/out/server.js",
"args": ["--node-ipc"],
"filetypes": ["rescript"],
"rootPatterns": ["bsconfig.json"]
}
},
"solargraph.useBundler": false,
"solargraph.bundlerPath": "/Users/danwetherald/.rbenv/versions/2.6.5/bin/bundle",
"solargraph.autoformat": true,
Expand Down
12 changes: 10 additions & 2 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ call plug#begin('~/dotfiles/nvim/plugged')
\ 'coc-diagnostic',
\ 'coc-tailwindcss',
\ 'coc-reason',
\ 'coc-rescript',
\ 'coc-tabnine',
\ 'coc-solargraph',
\ 'coc-prisma',
Expand Down Expand Up @@ -604,7 +603,16 @@ call plug#begin('~/dotfiles/nvim/plugged')

" ReasonML {{{
Plug 'reasonml-editor/vim-reason-plus'
Plug 'ryyppy/vim-rescript'
Plug 'rescript-lang/vim-rescript'

let g:rescript_type_hint_bin = "~/dotfiles/nvim/lang_servers/reason-language-server/bin.exe"

autocmd BufWritePost *.res,*.resi silent RescriptFormat

augroup rescriptFixes
autocmd!
autocmd FileType rescript call rescript#ChangeBinPaths()
augroup END
" }}}

" TypeScript {{{
Expand Down

0 comments on commit 0b9cd04

Please sign in to comment.