nvim-config

Log | Files | Refs | Submodules | README

commit 95bd40706b19a6df41a25fa08726639663552acb
parent 81d956d6b0c9f04691b0068c6757cb97497569ef
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Thu, 25 Aug 2022 17:51:10 +0200

Update

Diffstat:
Mafter/ftplugin/javascript.vim | 4+++-
Aafter/ftplugin/lua.lua | 7+++++++
Dafter/ftplugin/lua.vim | 9---------
Mafter/plugin/mappings.vim | 5+----
Mlua/completree-config.lua | 2++
Mlua/lsp_config.lua | 7+++++++
Mlua/plugins.lua | 2+-
7 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim @@ -1,3 +1,5 @@ -" Last Change: 2020 juil. 09 +" Last Change: 2022 Aug 18 set expandtab set tabstop=2 softtabstop=2 shiftwidth=2 + +nnoremap <buffer> gp :silent %!prettier --stdin-filepath %<CR> diff --git a/after/ftplugin/lua.lua b/after/ftplugin/lua.lua @@ -0,0 +1,7 @@ +vim.opt_local.foldmethod="expr" +vim.opt_local.foldexpr="nvim_treesitter#foldexpr()" +vim.opt_local.tabstop=2 +vim.opt_local.shiftwidth=2 +vim.opt_local.softtabstop=2 +vim.opt_local.comments:prepend(":---") +vim.opt_local.makeprg="TEST_FILE=%:p make test" diff --git a/after/ftplugin/lua.vim b/after/ftplugin/lua.vim @@ -1,9 +0,0 @@ -" Last Change: 2021 Jul 29 -setlocal foldmethod=expr -setlocal foldexpr=nvim_treesitter#foldexpr() -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal softtabstop=2 -setlocal omnifunc=v:lua.vim.lsp.omnifunc - -setlocal makeprg=TEST_FILE=%:p\ make\ test diff --git a/after/plugin/mappings.vim b/after/plugin/mappings.vim @@ -1,4 +1,4 @@ -" Last Change: 2022 Aug 23 +" Last Change: 2022 Aug 25 vnoremap <silent> < <gv vnoremap <silent> > >gv @@ -31,8 +31,5 @@ nnoremap <silent> <C-I> <C-I>zz nnoremap ]c <cmd>cnext<CR> nnoremap [c <cmd>cprevious<CR> -" Got from https://prettier.io/docs/en/vim.html -nnoremap gp :silent %!prettier --stdin-filepath %<CR> - nnoremap <Leader>zs <cmd>1Zest search<CR> nnoremap <Leader>zc <cmd>Zest create<CR> diff --git a/lua/completree-config.lua b/lua/completree-config.lua @@ -62,6 +62,8 @@ comp.setup { tex = lsp_completion, haskell = lsp_completion, go = lsp_completion, + javascript = lsp_completion, + typescript = lsp_completion, -- For git commit and text only do luasnip NeogitCommitMessage = cdef.luasnip, diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -196,6 +196,12 @@ local system_lsps = { filetypes = { "haskell" }, }, + tsserver = { + command = { "typescript-language-server", "--stdio" }, + filetypes = { "typescript", "javascript" }, + root_markers = { "package.json", ".git" } + }, + ocamllsp = { filetypes = { "ocaml" }, }, @@ -255,6 +261,7 @@ local system_lsps = { diagnostics = { -- Get the language server to recognize the `vim` global globals = { 'vim' }, + workspaceDelay = -1, }, workspace = { -- Make the server aware of Neovim runtime files diff --git a/lua/plugins.lua b/lua/plugins.lua @@ -44,7 +44,7 @@ return packer.startup(function(use) }, config = function() require 'tele_config' - end + end, } localuse "vigoux/notifier.nvim"