From 2a1fde4cbe06ee727552e5627ddce360846a85c2 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Thu, 10 Mar 2022 12:21:11 -0600 Subject: [PATCH] added angular language server config. --- neovim/.config/nvim/lua/LSPconfig.lua | 11 ++++++++ neovim/.config/nvim/lua/packages.lua | 40 ++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/neovim/.config/nvim/lua/LSPconfig.lua b/neovim/.config/nvim/lua/LSPconfig.lua index 62d809a..d931db6 100644 --- a/neovim/.config/nvim/lua/LSPconfig.lua +++ b/neovim/.config/nvim/lua/LSPconfig.lua @@ -49,6 +49,17 @@ vim.g.markdown_fenced_languages = { "ts=typescript" } +--angular configuration. To install LS, $ npm install -g @angular/language-server +local project_library_path = "/path/to/project/lib" +local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} + --rust configuration local rustOpts = { tools = { -- rust-tools options diff --git a/neovim/.config/nvim/lua/packages.lua b/neovim/.config/nvim/lua/packages.lua index 7e47b02..6025666 100644 --- a/neovim/.config/nvim/lua/packages.lua +++ b/neovim/.config/nvim/lua/packages.lua @@ -63,7 +63,45 @@ return require('packer').startup(function(use) requires = { 'kyazdani42/nvim-web-devicons', -- optional, for file icon }, - config = function() require'nvim-tree'.setup {} end + config = function() require'nvim-tree'.setup { + view={mapping={ + { key = {"", "o", "<2-LeftMouse>"}, action = "edit" }, + { key = "", action = "edit_in_place" }, + { key = {"O"}, action = "edit_no_picker" }, + { key = {"<2-RightMouse>", ""}, action = "cd" }, + { key = "", action = "vsplit" }, + { key = "", action = "split" }, + { key = "", action = "tabnew" }, + { key = "<", action = "prev_sibling" }, + { key = ">", action = "next_sibling" }, + { key = "P", action = "parent_node" }, + { key = "", action = "close_node" }, + { key = "", action = "preview" }, + { key = "K", action = "first_sibling" }, + { key = "J", action = "last_sibling" }, + { key = "I", action = "toggle_ignored" }, + { key = "H", action = "toggle_dotfiles" }, + { key = "R", action = "refresh" }, + { key = "a", action = "create" }, + { key = "d", action = "remove" }, + { key = "D", action = "trash" }, + { key = "r", action = "rename" }, + { key = "", action = "full_rename" }, + { key = "x", action = "cut" }, + { key = "c", action = "copy" }, + { key = "p", action = "paste" }, + { key = "y", action = "copy_name" }, + { key = "Y", action = "copy_path" }, + { key = "gy", action = "copy_absolute_path" }, + { key = "[c", action = "prev_git_item" }, + { key = "]c", action = "next_git_item" }, + { key = "-", action = "dir_up" }, + { key = "s", action = "system_open" }, + { key = "q", action = "close" }, + { key = "g?", action = "toggle_help" }, + { key = "W", action = "collapse_all" } + }} + } end } --UI stuff