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 nerdtree
ayu-vim ayu-vim
goyo-vim goyo-vim
vim-sneak
csv-vim csv-vim
rainbow_parentheses-vim rainbow_parentheses-vim
vim-surround vim-surround
vim-devicons vim-devicons
nvim-web-devicons nvim-web-devicons
direnv-vim direnv-vim
telescope-nvim
plenary-nvim
bufferline-nvim
lualine-nvim
nvim-gps
nvim-treesitter
cmp-treesitter
# kitaab stuff # kitaab stuff
vimwiki vimwiki
taskwiki taskwiki
vim-zettel vim-zettel
telescope-nvim
plenary-nvim
bufferline-nvim
# lsp stuff # lsp stuff
ale ale
@ -271,6 +274,9 @@ in
" lua config " lua config
lua <<EOF lua <<EOF
-- autopairs
require('nvim-autopairs').setup{}
-- Setup nvim-cmp. -- Setup nvim-cmp.
local cmp = require('cmp') local cmp = require('cmp')
local cmp_autopairs = require('nvim-autopairs.completion.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. -- Setup lspconfig.
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) 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').rnix.setup {}
require('lspconfig').pylsp.setup {} require('lspconfig').pylsp.setup {}
require('lspconfig').terraform_lsp.setup {} require('lspconfig').terraform_lsp.setup {}
@ -349,8 +355,37 @@ require('lspconfig').terraform_lsp.setup {}
-- Bufferline -- Bufferline
require('bufferline').setup {} require('bufferline').setup {}
-- autopairs -- lualine
require('nvim-autopairs').setup{} 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 EOF
''; '';
}; };