rm nvimtree as it always opens on startup and this is annoying

master
Niclas Thobaben 2024-03-10 09:25:01 +01:00
parent 4104f6d11d
commit 741f5d0164
7 changed files with 58 additions and 106 deletions

View File

@ -1,42 +0,0 @@
require'nvim-web-devicons'.setup {
-- your personnal icons can go here (to override)
-- you can specify color or cterm_color instead of specifying both of them
-- DevIcon will be appended to `name`
override = {
zsh = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "Zsh"
}
};
-- globally enable different highlight colors per icon (default to true)
-- if set to false all icons will have the default icon's color
color_icons = true;
-- globally enable default icons (default to false)
-- will get overriden by `get_icons` option
default = true;
-- globally enable "strict" selection of icons - icon will be looked up in
-- different tables, first by filename, and if not found by extension; this
-- prevents cases when file doesn't have any extension but still gets some icon
-- because its name happened to match some extension (default to false)
strict = true;
-- same as `override` but specifically for overrides by filename
-- takes effect when `strict` is true
override_by_filename = {
[".gitignore"] = {
icon = "",
color = "#f1502f",
name = "Gitignore"
}
};
-- same as `override` but specifically for overrides by extension
-- takes effect when `strict` is true
override_by_extension = {
["log"] = {
icon = "",
color = "#81e043",
name = "Log"
}
};
}

View File

@ -0,0 +1,12 @@
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)
-- here you can setup the language servers
require'lspconfig'.gopls.setup{}

View File

@ -0,0 +1,16 @@
local lsp_zero = require("lsp-zero")
require("mason").setup()
require('mason-lspconfig').setup({
ensure_installed = {
"gopls",
"templ"
},
handlers = {
lsp_zero.default_setup,
},
})
vim.filetype.add({ extension = { templ = "templ" } })

View File

@ -1,27 +0,0 @@
-- disable netrw at the very start of your init.lua
--vim.g.loaded_netrw = 1
--vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour
vim.opt.termguicolors = true
-- empty setup using defaults
require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
sort = {
sorter = "case_sensitive",
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
vim.keymap.set("n", "<leader>pt", vim.cmd.NvimTreeOpen)

View File

@ -1,6 +1,6 @@
require("nthobaben.remap")
require("nthobaben.color")
require("nthobaben.packer")
require("nthobaben.color")
vim.wo.number = true
vim.wo.relativenumber = true

View File

@ -23,31 +23,29 @@ return require('packer').startup(function(use)
use 'tpope/vim-fugitive'
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional
},
}
use 'nvim-tree/nvim-web-devicons'
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
requires = {
--- Uncomment the two plugins below if you want to manage the language servers from neovim
-- {'williamboman/mason.nvim'},
-- {'williamboman/mason-lspconfig.nvim'},
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
requires = {
--- Uncomment the two plugins below if you want to manage the language servers from neovim
-- {'williamboman/mason.nvim'},
-- {'williamboman/mason-lspconfig.nvim'},
-- LSP Support
{'neovim/nvim-lspconfig'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
-- LSP Support
{'neovim/nvim-lspconfig'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
}
use {"akinsho/toggleterm.nvim", tag = '*', config = function()
require("toggleterm").setup()
end}
use {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
}
end)

View File

@ -89,6 +89,16 @@ _G.packer_plugins = {
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-cmp",
@ -99,21 +109,11 @@ _G.packer_plugins = {
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
url = "https://github.com/nvim-tree/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["onedark.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/onedark.nvim",
@ -129,11 +129,6 @@ _G.packer_plugins = {
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["tairiki.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/tairiki.nvim",
url = "https://github.com/deparr/tairiki.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/telescope.nvim",