This commit is contained in:
fugotakefusa 2025-10-30 21:48:31 +13:00
parent 1a0dd9687d
commit fcc6e18637
4 changed files with 17 additions and 25 deletions

View File

@ -6,22 +6,3 @@ vim.api.nvim_create_autocmd('TextYankPost', {
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,
})

View File

@ -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>')

View File

@ -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,
}) })

View File

@ -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 = {
@ -46,6 +44,19 @@ 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