pretty much done with nvim, fornow

This commit is contained in:
Anish L 2022-02-26 16:22:17 +10:00
parent aa825a1d3b
commit d05e426ea1

View file

@ -61,21 +61,24 @@ in
nerdtree
ayu-vim
goyo-vim
vim-sneak
csv-vim
rainbow_parentheses-vim
vim-surround
vim-devicons
nvim-web-devicons
direnv-vim
telescope-nvim
plenary-nvim
bufferline-nvim
lualine-nvim
nvim-gps
nvim-treesitter
cmp-treesitter
# kitaab stuff
vimwiki
taskwiki
vim-zettel
telescope-nvim
plenary-nvim
bufferline-nvim
# lsp stuff
ale
@ -271,6 +274,9 @@ in
" lua config
lua <<EOF
-- autopairs
require('nvim-autopairs').setup{}
-- Setup nvim-cmp.
local cmp = require('cmp')
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
@ -341,7 +347,7 @@ tabnine:setup({max_lines = 1000, max_num_results = 20, sort = true})
-- Setup lspconfig.
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
require('lspconfig').clojure-lsp.setup {}
require('lspconfig').clojure_lsp.setup {}
require('lspconfig').rnix.setup {}
require('lspconfig').pylsp.setup {}
require('lspconfig').terraform_lsp.setup {}
@ -349,8 +355,37 @@ require('lspconfig').terraform_lsp.setup {}
-- Bufferline
require('bufferline').setup {}
-- autopairs
require('nvim-autopairs').setup{}
-- lualine
local gps = require('nvim-gps')
require('lualine').setup {
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {
'filename', { gps.get_location, condition=gps.is_available },
},
lualine_x = {'fileformat', 'filetype'},
lualine_y = {
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end
},
lualine_z = {'location'}
}
}
EOF
'';
};