diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 7cc0943..cdcc7ac 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -2,6 +2,13 @@ return { -- add any tools you want to have installed below { "williamboman/mason.nvim", + dependencies = { "williamboman/mason-lspconfig.nvim" }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup({ + ensure_installed = { "lua_ls" }, + }) + end, opts = { ensure_installed = { "stylua", @@ -11,4 +18,22 @@ return { }, }, }, + { + "neovim/nvim-lspconfig", + config = function() + require("lspconfig").lua_ls.setup({ + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, -- Avoid "undefined global 'vim'" + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + telemetry = { enable = false }, + }, + }, + }) + end, + }, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 64447d8..947c38c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -41,6 +41,7 @@ return { build = "make", config = function() require("telescope").load_extension("fzf") + require("telescope.builtin").live_grep({ search_dirs = { "~/.ssh/known_hosts" } }) end, }, }, diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 17601e1..e645ecd 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -2,10 +2,11 @@ return { -- amongst your other plugins -- { "akinsho/toggleterm.nvim", version = "*", config = true }, -- or - {'akinsho/toggleterm.nvim', + { + 'akinsho/toggleterm.nvim', version = "*", opts = {--[[ things you want to change go here]] - direction = "horiztonal", + direction = "vertical", }, config = function() local toggleterm = require('toggleterm') @@ -19,6 +20,6 @@ return { nnoremap exe v:count1 . "ToggleTerm" inoremap exe v:count1 . "ToggleTerm" ]] - end, + end, } }