Configures python lsp. Adds indentation guides for yaml.
This commit is contained in:
parent
3febfcbcb4
commit
da37bd815e
5 changed files with 72 additions and 31 deletions
3
init.lua
3
init.lua
|
|
@ -17,7 +17,6 @@ require('lsp.go-ls')
|
||||||
-- Completion
|
-- Completion
|
||||||
require('nv-compe')
|
require('nv-compe')
|
||||||
|
|
||||||
-- Function signatures
|
require('nv-indent-blankline')
|
||||||
-- require('lsp_signature')
|
|
||||||
|
|
||||||
require('nv-prettier')
|
require('nv-prettier')
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
require'lspconfig'.pyright.setup{
|
require'lspconfig'.pyright.setup{}
|
||||||
cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Autoformat on save.
|
-- Autoformat on save.
|
||||||
vim.cmd("autocmd BufWritePre *.py execute ':Black'")
|
vim.cmd("autocmd BufWritePre *.py execute ':Black'")
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,27 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
-- Syntax
|
-- Syntax
|
||||||
use 'sheerun/vim-polyglot'
|
use 'sheerun/vim-polyglot'
|
||||||
use {'prettier/vim-prettier', run = "yarn install"}
|
use {
|
||||||
|
'prettier/vim-prettier',
|
||||||
|
run = "yarn install",
|
||||||
|
ft = {"javascript", "typescript", "json"}
|
||||||
|
}
|
||||||
use {'styled-components/vim-styled-components', branch = "main"}
|
use {'styled-components/vim-styled-components', branch = "main"}
|
||||||
use 'dominikduda/vim_current_word'
|
use 'dominikduda/vim_current_word'
|
||||||
|
use {
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
ft = {'yaml', 'yml', 'helm'},
|
||||||
|
config = function()
|
||||||
|
vim.opt.list = true
|
||||||
|
vim.opt.listchars:append("space:⋅")
|
||||||
|
vim.opt.listchars:append("eol:↴")
|
||||||
|
|
||||||
|
require("indent_blankline").setup {
|
||||||
|
show_end_of_line = true,
|
||||||
|
space_char_blankline = " ",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
use 'airblade/vim-rooter'
|
use 'airblade/vim-rooter'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ vim.o.timeoutlen = 500 -- By default timeoutlen is 1000 ms
|
||||||
|
|
||||||
vim.cmd(":set number relativenumber")
|
vim.cmd(":set number relativenumber")
|
||||||
|
|
||||||
|
|
||||||
|
vim.cmd("autocmd FileType helm set nofixendofline")
|
||||||
|
vim.cmd("autocmd FileType yaml set nofixendofline")
|
||||||
|
vim.cmd("autocmd FileType yml set nofixendofline")
|
||||||
|
|
||||||
------ Folding
|
------ Folding
|
||||||
-- vim.o.foldlevel = 99
|
-- vim.o.foldlevel = 99
|
||||||
-- Persist folds.
|
-- Persist folds.
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ local function save_profiles(threshold)
|
||||||
end
|
end
|
||||||
|
|
||||||
time([[Luarocks path setup]], true)
|
time([[Luarocks path setup]], true)
|
||||||
local package_path_str = "/Users/marianouvalle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/marianouvalle/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/marianouvalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/marianouvalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
local package_path_str = "/Users/juva/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/juva/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/juva/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/juva/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
local install_cpath_pattern = "/Users/marianouvalle/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
local install_cpath_pattern = "/Users/juva/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
||||||
if not string.find(package.path, package_path_str, 1, true) then
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
package.path = package.path .. ';' .. package_path_str
|
package.path = package.path .. ';' .. package_path_str
|
||||||
end
|
end
|
||||||
|
|
@ -57,7 +57,7 @@ end
|
||||||
time([[Luarocks path setup]], false)
|
time([[Luarocks path setup]], false)
|
||||||
time([[try_loadstring definition]], true)
|
time([[try_loadstring definition]], true)
|
||||||
local function try_loadstring(s, component, name)
|
local function try_loadstring(s, component, name)
|
||||||
local success, result = pcall(loadstring(s))
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
if not success then
|
if not success then
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
|
@ -71,88 +71,109 @@ time([[Defining packer_plugins]], true)
|
||||||
_G.packer_plugins = {
|
_G.packer_plugins = {
|
||||||
["auto-pairs"] = {
|
["auto-pairs"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/auto-pairs"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/auto-pairs",
|
||||||
|
url = "https://github.com/jiangmiao/auto-pairs"
|
||||||
},
|
},
|
||||||
["black-nvim"] = {
|
black = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/black-nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/black",
|
||||||
|
url = "https://github.com/psf/black"
|
||||||
},
|
},
|
||||||
["gitsigns.nvim"] = {
|
["gitsigns.nvim"] = {
|
||||||
config = { "\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rgitsigns\frequire\0" },
|
config = { "\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rgitsigns\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/gitsigns.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||||
|
url = "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
["lightline.vim"] = {
|
["lightline.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/lightline.vim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/lightline.vim",
|
||||||
|
url = "https://github.com/itchyny/lightline.vim"
|
||||||
},
|
},
|
||||||
["lsp_signature.nvim"] = {
|
["lsp_signature.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim",
|
||||||
|
url = "https://github.com/ray-x/lsp_signature.nvim"
|
||||||
},
|
},
|
||||||
["lspsaga.nvim"] = {
|
["lspsaga.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/lspsaga.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
|
||||||
|
url = "https://github.com/glepnir/lspsaga.nvim"
|
||||||
},
|
},
|
||||||
["nvim-compe"] = {
|
["nvim-compe"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/nvim-compe"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/nvim-compe",
|
||||||
|
url = "https://github.com/hrsh7th/nvim-compe"
|
||||||
},
|
},
|
||||||
["nvim-lspconfig"] = {
|
["nvim-lspconfig"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
["nvim-lspinstall"] = {
|
["nvim-lspinstall"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/nvim-lspinstall"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/nvim-lspinstall",
|
||||||
|
url = "https://github.com/kabouzeid/nvim-lspinstall"
|
||||||
},
|
},
|
||||||
["nvim-web-devicons"] = {
|
["nvim-web-devicons"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/nvim-web-devicons"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
["packer.nvim"] = {
|
["packer.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
},
|
},
|
||||||
["palenight.vim"] = {
|
["palenight.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/palenight.vim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/palenight.vim",
|
||||||
|
url = "https://github.com/drewtempelmeyer/palenight.vim"
|
||||||
},
|
},
|
||||||
["plenary.nvim"] = {
|
["plenary.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
},
|
},
|
||||||
["popup.nvim"] = {
|
["popup.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
||||||
|
url = "https://github.com/nvim-lua/popup.nvim"
|
||||||
},
|
},
|
||||||
["telescope.nvim"] = {
|
["telescope.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
["vim-commentary"] = {
|
["vim-commentary"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-commentary"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-commentary",
|
||||||
|
url = "https://github.com/tpope/vim-commentary"
|
||||||
},
|
},
|
||||||
["vim-go"] = {
|
["vim-go"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-go"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-go",
|
||||||
|
url = "https://github.com/fatih/vim-go"
|
||||||
},
|
},
|
||||||
["vim-polyglot"] = {
|
["vim-polyglot"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-polyglot"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-polyglot",
|
||||||
|
url = "https://github.com/sheerun/vim-polyglot"
|
||||||
},
|
},
|
||||||
["vim-prettier"] = {
|
["vim-prettier"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-prettier"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-prettier",
|
||||||
|
url = "https://github.com/prettier/vim-prettier"
|
||||||
},
|
},
|
||||||
["vim-rooter"] = {
|
["vim-rooter"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-rooter"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-rooter",
|
||||||
|
url = "https://github.com/airblade/vim-rooter"
|
||||||
},
|
},
|
||||||
["vim-styled-components"] = {
|
["vim-styled-components"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/marianouvalle/.local/share/nvim/site/pack/packer/start/vim-styled-components"
|
path = "/Users/juva/.local/share/nvim/site/pack/packer/start/vim-styled-components",
|
||||||
|
url = "https://github.com/styled-components/vim-styled-components"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue