Add LSP stuff
This commit is contained in:
36
nvim/lua/plugins/lsp-config.lua
Normal file
36
nvim/lua/plugins/lsp-config.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return
|
||||
{
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup({
|
||||
path = "append",
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup {
|
||||
ensure_installed = { "lua_ls" },
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({'n', 'v'}, '<leader>ca', vim.lsp.buf.code_action, {})
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,28 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set('n', '<C-S-o>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-S-s>', builtin.live_grep, {})
|
||||
end
|
||||
}
|
||||
{
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set('n', '<C-S-o>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-S-s>', builtin.live_grep, {})
|
||||
end
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
require("telescope").setup {
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- To get ui-select loaded and working with telescope, you need to call
|
||||
-- load_extension, somewhere after setup function:
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local install = require("nvim-treesitter.install")
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- build = ":TSUpdate",
|
||||
-- config = function()
|
||||
-- local install = require("nvim-treesitter.install")
|
||||
-- local configs = require("nvim-treesitter.configs")
|
||||
|
||||
install = {
|
||||
compilers = { clang },
|
||||
prefer_git = false,
|
||||
}
|
||||
-- install = {
|
||||
-- compilers = { clang },
|
||||
-- prefer_git = false,
|
||||
-- }
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "cmake", "query" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
-- configs.setup({
|
||||
-- ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "cmake", "query" },
|
||||
-- sync_install = false,
|
||||
-- highlight = { enable = true },
|
||||
-- indent = { enable = true },
|
||||
-- })
|
||||
-- end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user