diff --git a/nvim/after/plugin/coq.vim b/nvim/after/plugin/coq.vim index 5b4a222d..a7fbc2fc 100644 --- a/nvim/after/plugin/coq.vim +++ b/nvim/after/plugin/coq.vim @@ -1,8 +1,6 @@ " Set recommended to false let g:coq_settings = { "keymap.recommended": v:false } -" let g:coq_settings = { "keymap.jump_to_mark": "" } - " Keybindings ino pumvisible() ? "\" : "\" ino pumvisible() ? "\" : "\" diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua index d399675e..bb1a21bc 100644 --- a/nvim/after/plugin/lsp.lua +++ b/nvim/after/plugin/lsp.lua @@ -2,31 +2,10 @@ local nvim_lsp = require('lspconfig') local protocol = require'vim.lsp.protocol' local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - local opts = { noremap=true, silent=true } - - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('i', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'lwa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'lwr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'lwl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'lD', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'lrn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'lca', 'lua vim.lsp.buf.code_action()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'le', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - --buf_set_keymap('n', '', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'lq', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap("n", "lf", "lua vim.lsp.buf.formatting()", opts) - -- formatting if client.resolved_capabilities.document_formatting then vim.api.nvim_command [[augroup Format]] @@ -126,7 +105,6 @@ nvim_lsp.diagnosticls.setup { json = 'prettier', scss = 'prettier', less = 'prettier', - json = 'prettier', typescript = 'eslint_d', typescriptreact = 'eslint_d', markdown = 'prettier', diff --git a/nvim/init.vim b/nvim/init.vim index 84243148..9ebdde5e 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,11 +1,10 @@ call plug#begin() -Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} - -Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} - +Plug 'williamboman/nvim-lsp-installer' Plug 'neovim/nvim-lspconfig' +noremap [d :lua vim.lsp.diagnostic.goto_next() +noremap ]d :lua vim.lsp.diagnostic.goto_prev() -Plug 'williamboman/nvim-lsp-installer' +Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} set hidden set shortmess+=c @@ -268,3 +267,5 @@ vnoremap ~ y:call setreg('', TwiddleCase(@"), getregtype(''))gv""Pgv command! OpenFileInDefaultApp execute "!xdg-open '%'" command! OpenFileInBraveBrowser execute "!brave-browser '%'" + +let g:coq_settings = { 'auto_start': 'shut-up' }