diff --git a/nvim/init.lua b/nvim/init.lua index 6b1dbbc..bd0e0d9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -6,7 +6,7 @@ vim.opt.termguicolors = true vim.opt.cursorline = true -- highlight the line with the cursor vim.opt.wrap = false -- do not wrap long lines vim.opt.foldmethod = 'marker' -- when folding, use the marker -vim.opt.laststatus = 2 -- always show the status line +vim.opt.laststatus = 3 -- always show the status line, but only one, even with splits vim.opt.showtabline = 2 -- always show the tab bar vim.opt.scrolloff = 2 -- number of lines to always have around cursor vim.opt.splitright = true -- vertical splits open on the right @@ -26,17 +26,3 @@ vim.diagnostic.config({signs = false}) -- My plugins and their configuration require('plugins') - - --- -- nvim-snippy --- require('snippy').setup({ --- mappings = { --- is = { --- [''] = 'expand_or_advance', --- [''] = 'previous', --- }, --- nx = { --- ['x'] = 'cut_text', --- }, --- }, --- }) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 3acb404..799e9f4 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -22,7 +22,8 @@ return require('packer').startup(function() vim.api.nvim_buf_set_keymap(bufnr, 'n', 'rn', 'lua vim.lsp.buf.rename()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ca', 'lua vim.lsp.buf.code_action()', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.formatting()', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'f', 'lua vim.lsp.buf.format({async = true})', opts) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ge', 'lua vim.diagnostic.open_float()', opts) if client.resolved_capabilities.document_formatting then vim.api.nvim_command [[augroup Format]] @@ -46,7 +47,7 @@ return require('packer').startup(function() 'nvim-treesitter/nvim-treesitter', config = function() require('nvim-treesitter.configs').setup { - ensure_installed = 'maintained', + ensure_installed = { "python", "rust" }, sync_install = false, highlight = { enable = true,