diff options
Diffstat (limited to '.config/nvim/lua/setup')
-rw-r--r-- | .config/nvim/lua/setup/lualine.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/setup/nvim-cmp.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/setup/nvim-lsp-installer.lua | 7 |
3 files changed, 10 insertions, 6 deletions
diff --git a/.config/nvim/lua/setup/lualine.lua b/.config/nvim/lua/setup/lualine.lua index 1182fce..8c8649e 100644 --- a/.config/nvim/lua/setup/lualine.lua +++ b/.config/nvim/lua/setup/lualine.lua @@ -4,7 +4,7 @@ require'lualine'.setup { theme = 'onedark', component_separators = {left = '', right = ''}, section_separators = {left = '', right = ''}, - disabled_filetypes = {'startify', 'terminal', 'netrw', 'NvimTree', 'packer'} + disabled_filetypes = {'startify', 'terminal', 'netrw', 'NvimTree', 'packer'}, }, sections = { lualine_a = {'mode'}, @@ -12,7 +12,7 @@ require'lualine'.setup { lualine_c = {'filename'}, lualine_x = {'encoding', 'filetype'}, lualine_y = {'progress'}, - lualine_z = {'location'} + lualine_z = {'location'}, }, inactive_sections = { lualine_a = {}, @@ -20,8 +20,8 @@ require'lualine'.setup { lualine_c = {'filename'}, lualine_x = {'location'}, lualine_y = {}, - lualine_z = {} + lualine_z = {}, }, tabline = {}, - extensions = {} + extensions = {}, } diff --git a/.config/nvim/lua/setup/nvim-cmp.lua b/.config/nvim/lua/setup/nvim-cmp.lua index 584da73..4f08334 100644 --- a/.config/nvim/lua/setup/nvim-cmp.lua +++ b/.config/nvim/lua/setup/nvim-cmp.lua @@ -48,4 +48,3 @@ cmp.setup { { name = 'luasnip' }, }, } -vim.cmd('autocmd FileType markdown lua require("cmp").setup.buffer { enabled = false }') diff --git a/.config/nvim/lua/setup/nvim-lsp-installer.lua b/.config/nvim/lua/setup/nvim-lsp-installer.lua index bd3496e..de086f0 100644 --- a/.config/nvim/lua/setup/nvim-lsp-installer.lua +++ b/.config/nvim/lua/setup/nvim-lsp-installer.lua @@ -3,7 +3,12 @@ local lsp_installer = require("nvim-lsp-installer") -- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished -- or if the server is already installed). lsp_installer.on_server_ready(function(server) - local opts = {} + local opts = { + on_attach = function() + vim.cmd('doautocmd User lspAttached') + vim.cmd('autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()') + end, + } -- (optional) Customize the options passed to the server -- if server.name == "tsserver" then |