diff --git a/files/dotfiles/nvim/lua/user/init_plugins.lua b/files/dotfiles/nvim/lua/user/init_plugins.lua index abb47eb..700466a 100644 --- a/files/dotfiles/nvim/lua/user/init_plugins.lua +++ b/files/dotfiles/nvim/lua/user/init_plugins.lua @@ -8,6 +8,12 @@ if tree_status_ok then tree.setup() end +-- Symbols outline +local symbols_status_ok, symbols = pcall(require, "symbols-outline") +if symbols_status_ok then + symbols.setup() +end + -- Git signs (Gutter) local gitsigns_status_ok, gitsigns = pcall(require, "gitsigns") if gitsigns_status_ok then diff --git a/files/dotfiles/nvim/lua/user/lsp/mason.lua b/files/dotfiles/nvim/lua/user/lsp/mason.lua index d6a72be..7893496 100644 --- a/files/dotfiles/nvim/lua/user/lsp/mason.lua +++ b/files/dotfiles/nvim/lua/user/lsp/mason.lua @@ -1,5 +1,4 @@ local servers = { - "sumneko_lua", "pyright", "jsonls", } @@ -41,6 +40,5 @@ require('mason-lspconfig').setup_handlers({ end lspconfig[server].setup(opts) - end, }) diff --git a/files/dotfiles/nvim/lua/user/lsp/settings/sumneko_lua.lua b/files/dotfiles/nvim/lua/user/lsp/settings/sumneko_lua.lua deleted file mode 100644 index 0ac454a..0000000 --- a/files/dotfiles/nvim/lua/user/lsp/settings/sumneko_lua.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - settings = { - - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = { - [vim.fn.expand("$VIMRUNTIME/lua")] = true, - [vim.fn.stdpath("config") .. "/lua"] = true, - }, - }, - }, - }, -} diff --git a/files/dotfiles/nvim/lua/user/treesitter.lua b/files/dotfiles/nvim/lua/user/treesitter.lua index 4ee777a..915f036 100644 --- a/files/dotfiles/nvim/lua/user/treesitter.lua +++ b/files/dotfiles/nvim/lua/user/treesitter.lua @@ -1,18 +1,37 @@ local ts_status_ok, treeconfig = pcall(require, "nvim-treesitter.configs") -if not ts_status_ok then - return -end -treeconfig.setup { - ensure_installed = "all", - sync_install = false, - ignore_install = { "" }, -- List of parsers to ignore installing - highlight = { - enable = true, -- false will disable the whole extension - disable = { "" }, -- list of language that will be disabled - additional_vim_regex_highlighting = true, +if ts_status_ok then + treeconfig.setup { + ensure_installed = "all", + sync_install = false, + ignore_install = { "" }, -- List of parsers to ignore installing + highlight = { + enable = true, -- false will disable the whole extension + disable = { "" }, -- list of language that will be disabled + additional_vim_regex_highlighting = true, - }, - indent = { enable = true }, -} --- Coloschemes that support TreeSitter: --- https://github.com/nvim-treesitter/nvim-treesitter/wiki/Colorschemes + }, + indent = { enable = true }, + } + -- Coloschemes that support TreeSitter: + -- https://github.com/nvim-treesitter/nvim-treesitter/wiki/Colorschemes +end + + +local ctx_status_ok, ctxconfig = pcall(require, "treesitter-context") + +if ctx_status_ok then + ctxconfig.setup { + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + line_numbers = true, + multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line + trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' + -- Separator between context and content. Should be a single character string, like '-'. + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + separator = nil, + zindex = 20, -- The Z-index of the context window + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching + } +end diff --git a/files/dotfiles/shellconfig/common.sh b/files/dotfiles/shellconfig/common.sh index b225408..4103ace 100644 --- a/files/dotfiles/shellconfig/common.sh +++ b/files/dotfiles/shellconfig/common.sh @@ -14,6 +14,7 @@ alias ls='lsd' alias f='printf "\033c"' alias top=btm alias vim=nvim +alias v=nvim alias t=tmux diff --git a/roles/modern_unix_tools/tasks/main.yml b/roles/modern_unix_tools/tasks/main.yml index 107fcd1..2e23768 100644 --- a/roles/modern_unix_tools/tasks/main.yml +++ b/roles/modern_unix_tools/tasks/main.yml @@ -77,7 +77,7 @@ name: gh_release_bin vars: name: lsd - repo: Peltoche/lsd + repo: lsd-rs/lsd bin_path: "/lsd-*/lsd" man_path: "/lsd-*/lsd.1" autocomplete_path: "/lsd-*/autocomplete/lsd.bash-completion"