improve
This commit is contained in:
parent
1a0dd9687d
commit
fcc6e18637
|
|
@ -5,23 +5,4 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.hl.on_yank()
|
vim.hl.on_yank()
|
||||||
end,
|
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 ]]
|
-- [[ Basic Keymaps ]]
|
||||||
|
|
||||||
|
vim.keymap.set('i', 'jk', '<Esc>', { desc = 'Exit insert mode' })
|
||||||
|
|
||||||
-- Clear highlights on search when pressing <C-c> in normal mode
|
-- Clear highlights on search when pressing <C-c> in normal mode
|
||||||
-- See `:help hlsearch`
|
-- See `:help hlsearch`
|
||||||
vim.keymap.set('n', '<C-c>', '<cmd>nohlsearch<CR>')
|
vim.keymap.set('n', '<C-c>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ vim.opt.confirm = true
|
||||||
-- Configure diagnostics
|
-- Configure diagnostics
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = true,
|
virtual_text = true,
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
update_in_insert = true,
|
update_in_insert = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,12 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-treesitter.configs').setup {
|
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
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
|
@ -45,7 +43,20 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
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 = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue