some stuff
This commit is contained in:
parent
293f0a3344
commit
f448ef05de
1
configs/nvim/.gitignore
vendored
Normal file
1
configs/nvim/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
plugin
|
@ -10,6 +10,9 @@ local opt = vim.opt
|
|||||||
require ("plugins")
|
require ("plugins")
|
||||||
|
|
||||||
if u.has_plugin("cmp") then
|
if u.has_plugin("cmp") then
|
||||||
|
|
||||||
|
vim.g.did_load_filetypes = 1
|
||||||
|
|
||||||
-- Global options
|
-- Global options
|
||||||
o.number = true -- show line number
|
o.number = true -- show line number
|
||||||
o.showmatch = true -- show matching brackets
|
o.showmatch = true -- show matching brackets
|
||||||
@ -20,7 +23,6 @@ if u.has_plugin("cmp") then
|
|||||||
set autoindent
|
set autoindent
|
||||||
set expandtab
|
set expandtab
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set smartindent
|
|
||||||
set softtabstop=2
|
set softtabstop=2
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
]]
|
]]
|
||||||
@ -171,6 +173,7 @@ if u.has_plugin("cmp") then
|
|||||||
-- Autocompletion Setup
|
-- Autocompletion Setup
|
||||||
o.completeopt = "menuone,noselect,noinsert"
|
o.completeopt = "menuone,noselect,noinsert"
|
||||||
require "autocomplete"
|
require "autocomplete"
|
||||||
|
require "snippets"
|
||||||
|
|
||||||
-- LSP Config
|
-- LSP Config
|
||||||
require "lspinstaller-conf"
|
require "lspinstaller-conf"
|
||||||
|
@ -6,6 +6,9 @@ return require("packer").startup(function()
|
|||||||
-- General Helper Functions
|
-- General Helper Functions
|
||||||
use "nvim-lua/plenary.nvim"
|
use "nvim-lua/plenary.nvim"
|
||||||
|
|
||||||
|
-- Faster Filetype Detection
|
||||||
|
use "nathom/filetype.nvim"
|
||||||
|
|
||||||
use "alexghergh/nvim-tmux-navigation"
|
use "alexghergh/nvim-tmux-navigation"
|
||||||
|
|
||||||
-- Theming Section
|
-- Theming Section
|
||||||
@ -21,6 +24,8 @@ return require("packer").startup(function()
|
|||||||
use "karb94/neoscroll.nvim"
|
use "karb94/neoscroll.nvim"
|
||||||
|
|
||||||
use "tpope/vim-fugitive"
|
use "tpope/vim-fugitive"
|
||||||
|
use "tpope/vim-surround"
|
||||||
|
use "editorconfig/editorconfig-vim"
|
||||||
|
|
||||||
-- Code Navigation
|
-- Code Navigation
|
||||||
use "dense-analysis/ale"
|
use "dense-analysis/ale"
|
||||||
@ -35,14 +40,20 @@ return require("packer").startup(function()
|
|||||||
-- use "lervag/wiki.vim"
|
-- use "lervag/wiki.vim"
|
||||||
|
|
||||||
-- Syntax / Autocomplete
|
-- Syntax / Autocomplete
|
||||||
use "preservim/nerdcommenter"
|
|
||||||
use "neovim/nvim-lspconfig"
|
use "neovim/nvim-lspconfig"
|
||||||
use "williamboman/nvim-lsp-installer"
|
|
||||||
use "nvim-lua/lsp-status.nvim"
|
|
||||||
use "hrsh7th/nvim-cmp"
|
use "hrsh7th/nvim-cmp"
|
||||||
use "hrsh7th/cmp-nvim-lsp"
|
use "hrsh7th/cmp-nvim-lsp"
|
||||||
use "hrsh7th/cmp-path"
|
use "hrsh7th/cmp-path"
|
||||||
use "weilbith/nvim-code-action-menu" -- Need to find better alternative
|
use "hrsh7th/cmp-buffer"
|
||||||
|
use "hrsh7th/cmp-cmdline"
|
||||||
|
use "L3MON4D3/LuaSnip"
|
||||||
|
use "saadparwaiz1/cmp_luasnip"
|
||||||
|
use "rafamadriz/friendly-snippets"
|
||||||
|
|
||||||
|
use "tpope/vim-commentary"
|
||||||
|
|
||||||
|
use "williamboman/nvim-lsp-installer"
|
||||||
|
use "nvim-lua/lsp-status.nvim"
|
||||||
use "L3MON4D3/LuaSnip"
|
use "L3MON4D3/LuaSnip"
|
||||||
use "windwp/nvim-autopairs"
|
use "windwp/nvim-autopairs"
|
||||||
use "neoclide/jsonc.vim"
|
use "neoclide/jsonc.vim"
|
||||||
|
45
configs/nvim/lua/snippets.lua
Normal file
45
configs/nvim/lua/snippets.lua
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
local ls = require("luasnip")
|
||||||
|
|
||||||
|
-- some shorthands...
|
||||||
|
local s = ls.snippet
|
||||||
|
local sn = ls.snippet_node
|
||||||
|
local t = ls.text_node
|
||||||
|
local i = ls.insert_node
|
||||||
|
local f = ls.function_node
|
||||||
|
local c = ls.choice_node
|
||||||
|
local d = ls.dynamic_node
|
||||||
|
|
||||||
|
local types = require("luasnip.util.types")
|
||||||
|
|
||||||
|
-- Every unspecified option will be set to the default.
|
||||||
|
ls.config.set_config({
|
||||||
|
history = true,
|
||||||
|
-- Update more often, :h events for more info.
|
||||||
|
updateevents = "TextChanged,TextChangedI",
|
||||||
|
ext_opts = {
|
||||||
|
[types.choiceNode] = {
|
||||||
|
active = {
|
||||||
|
virt_text = { { "choiceNode", "Comment" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- treesitter-hl has 100, use something higher (default is 200).
|
||||||
|
ext_base_prio = 300,
|
||||||
|
-- minimal increase in priority.
|
||||||
|
ext_prio_increase = 1,
|
||||||
|
enable_autosnippets = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
ls.snippets = {
|
||||||
|
all = {
|
||||||
|
|
||||||
|
},
|
||||||
|
svelte = {
|
||||||
|
s("slt", {
|
||||||
|
t('<script lang="ts">'),
|
||||||
|
i(0),
|
||||||
|
t('</script>'),
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user