Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ end)
-- Enable break indent
vim.opt.breakindent = true

-- Set tab width and indentation for Neovim
vim.opt.shiftwidth = 4 -- Indent with 4 spaces
vim.opt.tabstop = 4 -- Tab key inserts 4 spaces
vim.opt.expandtab = true -- Converts tabs to spaces

-- Save undo history
vim.opt.undofile = true

Expand Down Expand Up @@ -617,7 +622,26 @@ require('lazy').setup({
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
pyright = {
on_init = function(client)
-- Get the active Python version from pyenv
local pyenv_version = vim.fn.trim(vim.fn.system 'pyenv version-name')
if pyenv_version ~= '' then
-- Construct the path to the Python interpreter for the pyenv virtualenv
local pyenv_python_path = '~/.pyenv/versions/' .. pyenv_version .. '/bin/python'
client.config.settings.python.pythonPath = vim.fn.expand(pyenv_python_path)
else
-- Fallback to system Python if pyenv is not active
client.config.settings.python.pythonPath = vim.fn.exepath 'python3'
end
client.notify 'workspace/didChangeConfiguration'
end,
settings = {
python = {
venvPath = '~/.pyenv/versions', -- Path to pyenv virtualenvs
},
},
},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
Expand Down Expand Up @@ -657,6 +681,7 @@ require('lazy').setup({
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'pyright',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

Expand Down Expand Up @@ -839,13 +864,15 @@ require('lazy').setup({
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
-- 'folke/tokyonight.nvim',
'shaunsingh/moonlight.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
init = function()
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
-- vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'moonlight'

-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
Expand Down Expand Up @@ -930,8 +957,8 @@ require('lazy').setup({
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
Expand Down
Loading