From c03fdcf28b3e1bf863d490e841e5045c12a5566d Mon Sep 17 00:00:00 2001 From: Eric Tiedemann Date: Mon, 20 Nov 2023 08:14:05 -0500 Subject: [PATCH] Add new LSP --- init.lua | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 3a98da03..3301eb38 100644 --- a/init.lua +++ b/init.lua @@ -112,7 +112,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -216,6 +216,16 @@ require('lazy').setup({ }, build = ':TSUpdate', }, + { + -- File Browser + 'nvim-tree/nvim-tree.lua', + opts = { + sort_by = "case_sensitive", + view = { width = 30, }, + renderer = { group_empty = true, }, + filters = { dotfiles = true, }, + } + }, -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. @@ -345,7 +355,7 @@ local function live_grep_git_root() local git_root = find_git_root() if git_root then require('telescope.builtin').live_grep({ - search_dirs = {git_root}, + search_dirs = { git_root }, }) end end @@ -368,9 +378,11 @@ vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { des vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) +vim.keymap.set('n', 'ss', require('telescope.builtin').lsp_document_symbols, { desc = '[S]earch [S]ymbols' }) vim.keymap.set('n', 'sG', ':LiveGrepGitRoot', { desc = '[S]earch by [G]rep on Git Root' }) vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) +vim.keymap.set('n', 'f', ':NvimTreeToggle\n', { desc = 'Open [F]iletree' }) -- [[ Configure Treesitter ]] -- See `:help nvim-treesitter` @@ -512,9 +524,11 @@ require('mason-lspconfig').setup() -- define the property 'filetypes' to the map in question. local servers = { -- clangd = {}, - -- gopls = {}, + gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + rust_analyzer = {}, + pylsp = {}, + ruff_lsp = {}, -- tsserver = {}, -- html = { filetypes = { 'html', 'twig', 'hbs'} },