fix: lsp stuff

main
Ayush Mukherjee 3 weeks ago
parent b26c19ba5c
commit a6d7dc4f59

@ -24,6 +24,7 @@ vim.opt.termguicolors = true
vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.signcolumn = "yes"
vim.o.guifont = "Roboto Mono for Powerline:h14"
vim.o.winborder = "rounded"
-- temp solution to force sync parsing for treesitter due to flickering
-- see gh issue: https://github.com/neovim/neovim/issues/32660

@ -63,7 +63,7 @@ local function lsp_keymaps(bufnr)
keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format()<cr>", opts)
keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
keymap(bufnr, "n", "<leadr>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
keymap(bufnr, "n", "<leader>lj", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<cr>", opts)
keymap(bufnr, "n", "<leader>lk", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", opts)
keymap(bufnr, "n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", opts)
@ -80,9 +80,9 @@ M.on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
end
if client.name == "emmet_ls" then
client.capabilities.textDocument.completion.completionItem.snippetSupport = true
end
if client.name == "emmet_ls" then
client.capabilities.textDocument.completion.completionItem.snippetSupport = true
end
lsp_keymaps(bufnr)
local status_ok, illuminate = pcall(require, "illuminate")

@ -1,9 +1,18 @@
return {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
globals = {
"require",
"vim",
},
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
},
},
}

@ -49,8 +49,8 @@ local function save_profiles(threshold)
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/ayush/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1694285958/share/lua/5.1/?/init.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1694285958/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/ayush/.cache/nvim/packer_hererocks/2.1.1694285958/lib/lua/5.1/?.so"
local package_path_str = "/home/ayush/.cache/nvim/packer_hererocks/2.1.1748459687/share/lua/5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1748459687/share/lua/5.1/?/init.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1748459687/lib/luarocks/rocks-5.1/?.lua;/home/ayush/.cache/nvim/packer_hererocks/2.1.1748459687/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/ayush/.cache/nvim/packer_hererocks/2.1.1748459687/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
@ -79,6 +79,11 @@ _G.packer_plugins = {
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["autoclose.nvim"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/autoclose.nvim",
url = "https://github.com/m4xshen/autoclose.nvim"
},
catpuccin = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/catpuccin",
@ -144,10 +149,10 @@ _G.packer_plugins = {
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["null-ls.nvim"] = {
["none-ls.nvim"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
url = "https://github.com/jose-elias-alvarez/null-ls.nvim"
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/none-ls.nvim",
url = "https://github.com/nvimtools/none-ls.nvim"
},
["nvim-cmp"] = {
loaded = true,
@ -159,16 +164,20 @@ _G.packer_plugins = {
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
url = "https://github.com/nvim-tree/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = false,
needs_bufread = false,
path = "/home/ayush/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
url = "https://github.com/kyazdani42/nvim-web-devicons"
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
@ -200,6 +209,11 @@ _G.packer_plugins = {
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["tokyonight.nvim"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
url = "https://github.com/folke/tokyonight.nvim"
},
["vim-illuminate"] = {
loaded = true,
path = "/home/ayush/.local/share/nvim/site/pack/packer/start/vim-illuminate",

Loading…
Cancel
Save