Merge branch 'master' of github.com:ChristianChiarulli/nvcode

This commit is contained in:
Chris 2021-03-28 19:18:00 -04:00
commit cd764de1bf
10 changed files with 25 additions and 17 deletions

View file

@ -48,8 +48,10 @@ require('lsp')
require('lsp.clangd')
require('lsp.lua-ls')
require('lsp.bash-ls')
require('lsp.go-ls')
require('lsp.js-ts-ls')
require('lsp.python-ls')
require('lsp.rust-ls')
require('lsp.json-ls')
require('lsp.yaml-ls')
require('lsp.vim-ls')

View file

@ -13,6 +13,7 @@ local flake8 = {
local isort = {formatCommand = "isort --quiet -", formatStdin = true}
local yapf = {formatCommand = "yapf --quiet", formatStdin = true}
local black = {formatCommand = "black --quiet --stdin-filename ", formatStdin = true}
if O.python.linter == 'flake8' then
table.insert(python_arguments, flake8)
@ -20,6 +21,8 @@ end
if O.python.formatter == 'yapf' then
table.insert(python_arguments, yapf)
elseif O.python.formatter == 'black' then
table.insert(python_arguments, black)
end
if O.python.isort then

4
lua/lsp/go-ls.lua Normal file
View file

@ -0,0 +1,4 @@
require'lspconfig'.gopls.setup{
cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
on_attach = require'lsp'.common_on_attach
}

5
lua/lsp/rust-ls.lua Normal file
View file

@ -0,0 +1,5 @@
require'lspconfig'.rust_analyzer.setup{
cmd = {DATA_PATH .. "/lspinstall/rust/rust-analyzer"},
on_attach = require'lsp'.common_on_attach
}

View file

@ -36,10 +36,9 @@
-- return npairs.check_break_line_char()
-- end
-- end
--
--
--
--
-- remap('i' , '<CR>','v:lua.MUtils.completion_confirm()', {expr = true , noremap = true})
-- TODO switch to lua plugin when possible
vim.cmd([[
let g:lexima_no_default_rules = v:true

View file

@ -4,7 +4,7 @@ O = {
colorscheme = 'nvcode',
python = {
linter = '',
-- @usage can be 'yapf'
-- @usage can be 'yapf', 'black'
formatter = '',
autoformat = false,
isort = false,

View file

@ -62,14 +62,12 @@ require('telescope').setup {
}
}
},
require'telescope'.setup {
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
}
}

View file

@ -5,7 +5,7 @@ require'nvim-treesitter.configs'.setup {
highlight = {
enable = true -- false will disable the whole extension
},
indent = {enable = true},
indent = {enable = true, disable = {"python"}},
playground = {
enable = true,
disable = {},

View file

@ -1,3 +0,0 @@
def thing(parameter_list):
pass

View file

@ -3,7 +3,7 @@
" Timeout
let g:which_key_timeout = 100
let g:which_key_display_names = {'<CR>': '↵', '<TAB>': '⇆'}
let g:which_key_display_names = {'<CR>': '↵', '<TAB>': '⇆', " ": 'SPC'}
" Map leader to which_key
nnoremap <silent> <leader> :silent <c-u> :silent WhichKey '<Space>'<CR>