mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
nvim: ft keymaps via ftplugin/
This commit is contained in:
parent
51e6343b9e
commit
32429308f3
22 changed files with 112 additions and 213 deletions
|
|
@ -1,3 +1,5 @@
|
|||
-- Source all lsp definition in
|
||||
-- ~/.config/nvim/lsp/*.lua
|
||||
local lsp_configs = {}
|
||||
for _, v in ipairs(vim.api.nvim_get_runtime_file("lsp/*", true)) do
|
||||
local name = vim.fn.fnamemodify(v, ":t:r")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
-- <leader> is space
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
-- Disable netrw (file explorer) use NvimTree instead
|
||||
-- Disable netrw (file explorer) use neo-tree instead
|
||||
-- See: lua/plugins/mod/neo-tree.lua
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
-- Disable Perl
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
-- Entry point for all plugins
|
||||
require("plugins")
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
--- Available LSP goes here
|
||||
--- Check https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
||||
--- for available server and name
|
||||
local M = {}
|
||||
-- Ensure that the following servers are installed and set
|
||||
-- Use :Mason to list all available servers
|
||||
M.servers = {
|
||||
"bashls", -- Bash
|
||||
"clangd", -- C/C++
|
||||
"gopls", -- Go
|
||||
"html", -- HTML
|
||||
"jsonls", -- JSON
|
||||
"lua_ls", -- Lua
|
||||
-- "markdown_oxide", -- Markdown
|
||||
"pyright", -- Python
|
||||
"rust_analyzer", -- Rust
|
||||
"taplo", -- TOML
|
||||
"ts_ls", -- TypeScript
|
||||
"vimls", -- vimscript
|
||||
"yamlls", -- YAML
|
||||
"beancount", -- Beancount
|
||||
}
|
||||
|
||||
-- Configuration for each server defines here
|
||||
M.server_config = {
|
||||
lua_ls = {
|
||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
require("plugins.lazy-nvim")
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- { import = "plugins.appearance" },
|
||||
{ import = "plugins.completion" },
|
||||
{ import = "plugins.fileutils" },
|
||||
{ import = "plugins.lang" },
|
||||
{ import = "plugins.dap" },
|
||||
{ import = "plugins.edit" },
|
||||
{ import = "plugins.misc" },
|
||||
},
|
||||
checker = { enabled = false },
|
||||
})
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
require("plugins.lazy-nvim")
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
-- { import = "plugins.completion" },
|
||||
-- { import = "plugins.fileutils" },
|
||||
-- { import = "plugins.lsp" },
|
||||
-- { import = "plugins.edit" },
|
||||
-- { import = "plugins.misc" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue