diff --git a/lua/autocmds.lua b/lua/autocmds.lua index ce54b9d4..a89f7e3b 100644 --- a/lua/autocmds.lua +++ b/lua/autocmds.lua @@ -5,23 +5,4 @@ vim.api.nvim_create_autocmd('TextYankPost', { callback = function() vim.hl.on_yank() end, -}) - --- Start python lsp server when python file enters buffer -vim.api.nvim_create_autocmd("FileType", { - pattern = "python", - callback = function() - vim.lsp.start({ - name = "pyright", - cmd = { "pyright-langserver", "--stdio" }, - root_dir = vim.fn.getcwd(), - settings = { - python = { - analysis = { - openFilesOnly = true, - }, - }, - }, - }) - end, }) \ No newline at end of file diff --git a/lua/keymaps.lua b/lua/keymaps.lua index d8bfec33..ea1d6e6e 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -1,5 +1,7 @@ -- [[ Basic Keymaps ]] +vim.keymap.set('i', 'jk', '', { desc = 'Exit insert mode' }) + -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') diff --git a/lua/options.lua b/lua/options.lua index 7457f2db..06264e27 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -45,8 +45,6 @@ vim.opt.confirm = true -- Configure diagnostics vim.diagnostic.config({ virtual_text = true, - signs = true, - underline = true, update_in_insert = true, }) diff --git a/lua/plugins.lua b/lua/plugins.lua index 2f0e59cd..96af57b7 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -20,14 +20,12 @@ require('lazy').setup({ end }, - - { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', config = function() require('nvim-treesitter.configs').setup { - ensure_installed = { 'c', 'lua', 'vim', 'vimdoc', 'query' }, + ensure_installed = { 'c', 'lua', 'vim', 'vimdoc', 'query', 'python' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -45,7 +43,20 @@ require('lazy').setup({ }, } end, - }, + }, + { + -- handle LSP server installation and management + -- let's be lazy for now. + "mason-org/mason.nvim", + dependencies = { + "mason-org/mason-lspconfig.nvim", + "neovim/nvim-lspconfig", + }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup() + end + } }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the