fixed lualine config and neotree startup

This commit is contained in:
Tawfeeq 2025-02-10 16:42:52 +01:00
parent 770feee470
commit e88427bcf6
3 changed files with 19 additions and 35 deletions

View File

@ -91,10 +91,7 @@ I hope you enjoy your Neovim journey,
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
P.S. You can delete this when you're done too. It's your config now! :) P.S. You can delete this when you're done too. It's your config now! :)
--]] --]]
vim.cmd [[ autocmd VimEnter * Neotree position=left ]]
-- vim.api.nvim_set_hl(0, 'ReturnKeyword', { fg = '#FF0000', bold = true })
-- vim.cmd [[syntax match ReturnKeyword /\<return\>/]]
--
--AUTO RELOAD ON SAVE --AUTO RELOAD ON SAVE
vim.api.nvim_create_autocmd('BufWritePost', { vim.api.nvim_create_autocmd('BufWritePost', {
pattern = '*', -- For all files pattern = '*', -- For all files
@ -120,23 +117,6 @@ vim.api.nvim_create_autocmd({ 'FileChangedShellPost' }, {
pattern = '*', pattern = '*',
command = "echohl WarningMsg | echo 'File changed on disk. Buffer reloaded.' | echohl None", command = "echohl WarningMsg | echo 'File changed on disk. Buffer reloaded.' | echohl None",
}) })
-- Trigger 'autoread' when files change on disk
-- -- Auto-read changed files when focus is gained or events occur
-- vim.api.nvim_create_autocmd({ 'FocusGained', 'BufEnter', 'CursorHold', 'CursorHoldI' }, {
-- callback = function()
-- if vim.fn.mode() ~= 'c' then
-- vim.cmd 'checktime'
-- end
-- end,
-- })
--
--
-- -- Notification after file change
-- vim.api.nvim_create_autocmd('FileChangedShellPost', {
-- callback = function()
-- vim.api.nvim_echo({ { 'File changed on disk. Buffer reloaded.', 'WarningMsg' } }, true, {})
-- end,
-- })
vim.lsp.inlay_hint.enable() vim.lsp.inlay_hint.enable()
-- vim.opt.tabstop = 2 -- vim.opt.tabstop = 2
@ -209,6 +189,7 @@ vim.api.nvim_create_autocmd('VimEnter', {
vim.opt.guicursor = 'n-v-c:ver90,i:block-blinkwait400-blinkoff200-blinkon250,sm:block' vim.opt.guicursor = 'n-v-c:ver90,i:block-blinkwait400-blinkoff200-blinkon250,sm:block'
end, end,
}) })
-------------------------------------------------------------------- --------------------------------------------------------------------
if vim.fn.has 'termguicolors' == 1 then if vim.fn.has 'termguicolors' == 1 then
@ -574,13 +555,12 @@ require('lazy').setup({
{ 'Bilal2453/luvit-meta', lazy = true }, { 'Bilal2453/luvit-meta', lazy = true },
}, },
config = function() config = function()
local lspconfig = require 'lspconfig'
local util = require 'lspconfig/util'
local capabilities = require('blink.cmp').get_lsp_capabilities() local capabilities = require('blink.cmp').get_lsp_capabilities()
require('lspconfig').lua_ls.setup { capabilities = capabilities } require('lspconfig').lua_ls.setup { capabilities = capabilities }
-- Mason setup to ensure terraform-ls is installed -- Mason setup to ensure terraform-ls is installed
require('mason-lspconfig').setup { require('mason-lspconfig').setup {
ensure_installed = { 'terraformls', 'tflint' }, ensure_installed = { 'terraformls', 'tflint' },
automatic_installation = {},
} }
require('lspconfig').terraformls.setup {} require('lspconfig').terraformls.setup {}
@ -727,7 +707,7 @@ require('lazy').setup({
local servers = { local servers = {
-- terraformls = {}, -- terraformls = {},
-- clangd = {}, -- clangd = {},
gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
rust_analyzer = {}, rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@ -1021,7 +1001,7 @@ require('lazy').setup({
'python', 'python',
'typescript', 'typescript',
'javascript', 'javascript',
'go', -- 'go',
}, },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,

View File

@ -48,7 +48,12 @@ local config = {
}, },
sections = { sections = {
-- these are to remove the defaults -- these are to remove the defaults
lualine_a = {}, lualine_a = {
-- {
-- 'buffers',
-- show_filename_only = false,
-- },
},
lualine_b = {}, lualine_b = {},
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
@ -125,16 +130,15 @@ ins_left {
cond = conditions.buffer_not_empty, cond = conditions.buffer_not_empty,
} }
ins_left { -- ins_left {
'filename', -- 'filename',
cond = conditions.buffer_not_empty, -- cond = conditions.buffer_not_empty,
color = { fg = colors.magenta, gui = 'bold' }, -- color = { fg = colors.magenta, gui = 'bold' },
} -- }
ins_left { 'location' }
ins_left { 'location', show_filename_only = false }
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } } ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
ins_left { 'buffers', show_filename_only = false }
ins_left { ins_left {
'diagnostics', 'diagnostics',
sources = { 'nvim_diagnostic' }, sources = { 'nvim_diagnostic' },

View File

@ -64,7 +64,7 @@ return {
-- online, please don't ask me how to install them :) -- online, please don't ask me how to install them :)
ensure_installed = { ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want -- Update this to ensure that you have the debuggers for the langs you want
'delve', -- 'delve',
'js', 'js',
}, },
} }