diff options
| author | Chris <[email protected]> | 2021-03-27 03:01:24 -0400 | 
|---|---|---|
| committer | Chris <[email protected]> | 2021-03-27 03:01:24 -0400 | 
| commit | 4450d30d3e0374a57b6cc1985ba5f742275eb950 (patch) | |
| tree | e776d6fb052a171b6535e6119342ea1899867d65 | |
| parent | 127ff7231a63a75887647c11485338b354617c0b (diff) | |
update for config
| -rw-r--r-- | init.lua | 2 | ||||
| -rw-r--r-- | lua/config.lua | 1 | ||||
| -rw-r--r-- | lua/lsp/python-ls.lua | 12 | ||||
| -rw-r--r-- | lua/nv-globals.lua | 14 | ||||
| -rw-r--r-- | vimscript/nv-whichkey/init.vim | 1 | 
5 files changed, 18 insertions, 12 deletions
| @@ -2,6 +2,7 @@  require('plugins')  require('nv-utils')  require('nv-globals') +require('config')  require('settings')  require('keymappings')  require('colorscheme') @@ -58,6 +59,5 @@ require('lsp.efm-general-ls')  require('lsp.virtual_text')  -- Source config last -require('config')  -- vim.lsp.callbacks["textDocument/publishDiagnostics"] = function() end  -- vim.lsp.handlers["textDocument/publishDiagnostics"] = nil diff --git a/lua/config.lua b/lua/config.lua index a579e092..3bd6952b 100644 --- a/lua/config.lua +++ b/lua/config.lua @@ -14,4 +14,5 @@ O.colorscheme = 'nvcode'  O.python.formatter = 'yapf'  O.python.linter = nil  O.python.autoformat = false +O.python.virtual_text = false diff --git a/lua/lsp/python-ls.lua b/lua/lsp/python-ls.lua index 4898a0b5..4bdbd9d9 100644 --- a/lua/lsp/python-ls.lua +++ b/lua/lsp/python-ls.lua @@ -1,8 +1,12 @@  -- npm i -g pyright --- local capabilities = vim.lsp.protocol.make_client_capabilities() --- capabilities.textDocument.completion.completionItem.snippetSupport = true  require'lspconfig'.pyright.setup {      cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"}, -    on_attach = require'lsp'.common_on_attach -    -- capabilities = capabilities +    on_attach = require'lsp'.common_on_attach, +     handlers = { +       ["textDocument/publishDiagnostics"] = vim.lsp.with( +         vim.lsp.diagnostic.on_publish_diagnostics, { +           virtual_text = O.python.virtual_text +         } +       ), +     }  } diff --git a/lua/nv-globals.lua b/lua/nv-globals.lua index b5bdffc9..48086373 100644 --- a/lua/nv-globals.lua +++ b/lua/nv-globals.lua @@ -2,13 +2,13 @@ O = {      auto_complete = true,      colorscheme = 'nvcode', -    python = {linter = nil, formatter = nil, autoformat = false}, -    javascript = {linter = nil, formatter = nil, autoformat = false}, -    javascriptreact = {linter = nil, formatter = nil, autoformat = false}, -    lua = {formatter = nil, autoformat = false}, -    bash = {linter = nil, formatter = nil, autoformat = false}, -    css = {formatter = nil, autoformat = false}, -    json = {formatter = nil, autoformat = false}, +    python = {linter = '', formatter = '', autoformat = false, virtual_text=true}, +    javascript = {linter = '', formatter = '', autoformat = false, virtual_text=true}, +    javascriptreact = {linter = '', formatter = '', autoformat = false, virtual_text=true}, +    lua = {formatter = '', autoformat = false, virtual_text=true}, +    bash = {linter = '', formatter = '', autoformat = false, virtual_text=true}, +    css = {formatter = '', autoformat = false, virtual_text=true}, +    json = {formatter = '', autoformat = false, virtual_text=true},  } diff --git a/vimscript/nv-whichkey/init.vim b/vimscript/nv-whichkey/init.vim index 2cfcb8fd..2ec3f9e5 100644 --- a/vimscript/nv-whichkey/init.vim +++ b/vimscript/nv-whichkey/init.vim @@ -21,6 +21,7 @@ autocmd! FileType which_key  autocmd  FileType which_key set laststatus=0 noshowmode noruler    \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler +let g:which_key_map['/'] = 'comment toggle'  let g:which_key_map[';'] = [ ':Dashboard'                                      , 'home screen' ]  let g:which_key_map[','] = [ '<Plug>(emmet-expand-abbr)'                       , 'expand tags' ]  let g:which_key_map['"'] = [ '<Plug>PeekupOpen'                                , 'registers' ] | 
