diff options
Diffstat (limited to 'lua/tjk/plugins')
-rw-r--r-- | lua/tjk/plugins/cmp.lua | 2 | ||||
-rw-r--r-- | lua/tjk/plugins/colorscheme.lua | 15 | ||||
-rw-r--r-- | lua/tjk/plugins/lsp.lua | 16 | ||||
-rw-r--r-- | lua/tjk/plugins/treesitter.lua | 6 |
4 files changed, 25 insertions, 14 deletions
diff --git a/lua/tjk/plugins/cmp.lua b/lua/tjk/plugins/cmp.lua index 1a3cf2f..7bc4234 100644 --- a/lua/tjk/plugins/cmp.lua +++ b/lua/tjk/plugins/cmp.lua @@ -2,6 +2,7 @@ return { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "ray-x/cmp-treesitter", }, @@ -10,6 +11,7 @@ return { cmp.setup { sources = { { name = "path" }, + { name = "lsp" }, { name = "buffer" }, { name = "treesitter" }, }, diff --git a/lua/tjk/plugins/colorscheme.lua b/lua/tjk/plugins/colorscheme.lua index 2307097..bb62cb3 100644 --- a/lua/tjk/plugins/colorscheme.lua +++ b/lua/tjk/plugins/colorscheme.lua @@ -1,22 +1,17 @@ -local root_mode = os.getenv "USER" == "root" -local tty_mode = os.getenv "DISPLAY" == nil - --- load condition -local enable_gruvbox = not root_mode and not tty_mode - -- use another colorscheme if running as root -if root_mode then +if os.getenv "USER" == "root" then vim.cmd.colorscheme "koehler" + return {} end --- disable termguicolors when in a tty -if tty_mode then +-- disable gruvbox and termguicolors when in a tty +if os.getenv "DISPLAY" == nil then vim.opt.termguicolors = false + return {} end return { "ellisonleao/gruvbox.nvim", - cond = enable_gruvbox, priority = 9001, config = function() vim.o.background = "dark" diff --git a/lua/tjk/plugins/lsp.lua b/lua/tjk/plugins/lsp.lua new file mode 100644 index 0000000..050a5a6 --- /dev/null +++ b/lua/tjk/plugins/lsp.lua @@ -0,0 +1,16 @@ +return { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", -- install lsp's + "williamboman/mason-lspconfig.nvim", + }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup { automatic_installation = true } + local lspconfig = require("lspconfig") + lspconfig.pylsp.setup { + autostart = false, + capabilities = require("cmp_nvim_lsp").default_capabilities() + } + end +} diff --git a/lua/tjk/plugins/treesitter.lua b/lua/tjk/plugins/treesitter.lua index 925fb13..835e1af 100644 --- a/lua/tjk/plugins/treesitter.lua +++ b/lua/tjk/plugins/treesitter.lua @@ -11,9 +11,7 @@ return { "windwp/nvim-ts-autotag", -- close tags in html/xml type languages opts = { per_filetype = { - ["html"] = { - enable_close = true - } + ["html"] = { enable_close = true }, } } }, @@ -24,7 +22,7 @@ return { ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "comment", "javascript", "html", "css", "scss", "python", "php" }, auto_install = true, -- install available parsers when entering new buffers - highlight = { enable = true, disable = { "yaml", "bash", "latex" } }, + highlight = { enable = true, disable = { "yaml" } }, indent = { enable = true, disable = { "yaml" } }, --playground = { enable = true }, -- treesitter debug }) |