improve
This commit is contained in:
parent
1a0dd9687d
commit
fcc6e18637
|
|
@ -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,
|
||||
})
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
|
||||
vim.keymap.set('i', 'jk', '<Esc>', { desc = 'Exit insert mode' })
|
||||
|
||||
-- Clear highlights on search when pressing <C-c> in normal mode
|
||||
-- See `:help hlsearch`
|
||||
vim.keymap.set('n', '<C-c>', '<cmd>nohlsearch<CR>')
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ vim.opt.confirm = true
|
|||
-- Configure diagnostics
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue