From b5b879f27895412639d56d2c087f1c71881471a2 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Wed, 11 Aug 2021 00:21:20 +0200 Subject: [PATCH] updates --- hjalmar-droneship/onedrive/config | 2 +- jupyter/jupyter_notebook_config.py | 2 +- nvim/init.lua | 84 ++++++++++++++++++++++++++---- 3 files changed, 77 insertions(+), 11 deletions(-) diff --git a/hjalmar-droneship/onedrive/config b/hjalmar-droneship/onedrive/config index 11e7686..f86e8a5 100644 --- a/hjalmar-droneship/onedrive/config +++ b/hjalmar-droneship/onedrive/config @@ -25,7 +25,7 @@ skip_file=".~*|~*|*.tmp" # no_remote_delete = "false" skip_symlinks = "true" # debug_https = "false" -skip_dotfiles = "true" +# skip_dotfiles = "true" # dry_run = "false" # min_notify_changes = "5" # monitor_log_frequency = "5" diff --git a/jupyter/jupyter_notebook_config.py b/jupyter/jupyter_notebook_config.py index cb49815..ecf7c6f 100644 --- a/jupyter/jupyter_notebook_config.py +++ b/jupyter/jupyter_notebook_config.py @@ -79,7 +79,7 @@ # # Local IP addresses (such as 127.0.0.1 and ::1) are allowed as local, along # with hostnames configured in local_hostnames. -#c.NotebookApp.allow_remote_access = False +c.NotebookApp.allow_remote_access = True ## Whether to allow the user to run the notebook as root. #c.NotebookApp.allow_root = False diff --git a/nvim/init.lua b/nvim/init.lua index 7608b52..b974d6a 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -73,7 +73,7 @@ opt.clipboard = opt.clipboard + {"unnamedplus"} -- za zA switch fold (small/full) -- zi toggle folds -- zi zj move to next / prev fold -opt.foldenable = true +opt.foldenable = false opt.foldmethod = "expr" -- ---------------------------------------- @@ -314,13 +314,6 @@ require("packer").startup {function(use) end } - -- highlight for quick movement f/F - use {"unblevable/quick-scope", - config = function() - -- vim.g.qs_highlight_on_keys = {"f", "F", "t", "T"} - end - } - use {"haya14busa/vim-asterisk", config = function() vim.g["asterisk#keeppos"] = 1 @@ -550,6 +543,76 @@ require("packer").startup {function(use) end } + use { + "folke/trouble.nvim", + requires = "kyazdani42/nvim-web-devicons", + config = function() + require("trouble").setup { + position = "right", -- position of the list can be: bottom, top, left, right + height = 10, -- height of the trouble list when position is top or bottom + width = 60, -- width of the list when position is left or right + icons = true, -- use devicons for filenames + mode = "lsp_workspace_diagnostics", -- "lsp_workspace_diagnostics", "lsp_document_diagnostics", "quickfix", "lsp_references", "loclist" + fold_open = "", -- icon used for open folds + fold_closed = "", -- icon used for closed folds + action_keys = { -- key mappings for actions in the trouble list + close = "q", -- close the list + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + refresh = "r", -- manually refresh + jump = {"", ""}, -- jump to the diagnostic or open / close folds + open_split = { "" }, -- open buffer in new split + open_vsplit = { "" }, -- open buffer in new vsplit + open_tab = { "" }, -- open buffer in new tab + jump_close = {"o"}, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location + close_folds = {"zM", "zm"}, -- close all folds + open_folds = {"zR", "zr"}, -- open all folds + toggle_fold = {"zA", "za"}, -- toggle fold of current file + previous = "k", -- preview item + next = "j" -- next item + }, + indent_lines = true, -- add an indent guide below the fold icons + auto_open = false, -- automatically open the list when you have diagnostics + auto_close = false, -- automatically close the list when you have no diagnostics + auto_preview = true, -- automatically preview the location of the diagnostic. to close preview and go back to last window + auto_fold = false, -- automatically fold a file trouble list at creation + } + end + } + + use {"folke/todo-comments.nvim", + requires = {"nvim-lua/plenary.nvim"}, + config = function() + require("todo-comments").setup { + signs = true, -- show icons in the signs column + sign_priority = 8, -- sign priority + -- keywords recognized as todo comments + keywords = { + FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } }, + TODO = { icon = " ", color = "info" }, + HACK = { icon = " ", color = "warning" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + }, + merge_keywords = true, -- when true, custom keywords will be merged with the defaults + colors = { + error = { "LspDiagnosticsDefaultError", "ErrorMsg", "#DC2626" }, + warning = { "LspDiagnosticsDefaultWarning", "WarningMsg", "#FBBF24" }, + info = { "LspDiagnosticsDefaultInformation", "#10B981" }, + hint = { "LspDiagnosticsDefaultHint", "#7C3AED" }, + default = { "Identifier", "#2563EB" }, + }, + } + local map = vim.api.nvim_set_keymap + local opts = { noremap = true } + map("n", "", ":TodoTrouble", opts) + end + } + use {"glepnir/lspsaga.nvim", requires = {"neovim/nvim-lspconfig"}, run = ":TSUpdate", @@ -618,6 +681,8 @@ require("packer").startup {function(use) }, } local nvim_lsp = require("lspconfig") + -- sudo npm install -g typescript typescript-language-server + nvim_lsp.tsserver.setup{} -- sudo npm install -g yaml-language-server nvim_lsp.yamlls.setup{ on_attach = on_attach @@ -641,7 +706,7 @@ require("packer").startup {function(use) nvim_lsp.efm.setup{ on_attach = on_attach, init_options = { documentFormatting = true }, - filetypes = { "python", "markdown", "yaml", "lua" }, + filetypes = { "python", "markdown", "yaml", "lua", "javascript" }, root_dir = vim.loop.cwd, settings = { rootMarkers = { ".git/" }, @@ -663,6 +728,7 @@ require("packer").startup {function(use) formatStdin = true } }, + javascript = {prettier, eslint}, yaml = {prettier}, markdown = {prettier}, },