feat(emacs): add c-sharp support
This is only initial support. Most of the features are built-in to lsp-mode. I have added some snippets to make my life a bit easier. There a more tweaks coming but they are general in improving the editing experience not just targeted at c-sharp.
This commit is contained in:
parent
bfe7d7af2a
commit
6976cfe1fa
5 changed files with 43 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: /// <summary> ... </summary>
|
||||||
|
# key: ///
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $0
|
||||||
|
/// </summary>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: /// <inheritdoc ... />
|
||||||
|
# key: ///i
|
||||||
|
# --
|
||||||
|
/// <inheritdoc${1: cref="${2:Class}"} />$0
|
||||||
13
site-modules/core/files/emacs/snippets/csharp-mode/pbsd
Normal file
13
site-modules/core/files/emacs/snippets/csharp-mode/pbsd
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Practically BSD licence
|
||||||
|
# key: pbsd
|
||||||
|
# contributor: Ade Attwood <code@adeattwood.co.uk>
|
||||||
|
# uuid: pbsd
|
||||||
|
# --
|
||||||
|
/// <copyright file="`(file-name-nondirectory (buffer-file-name))`" company="Practically.io">
|
||||||
|
/// Copyright `(format-time-string "%Y")` Practically.io All rights reserved
|
||||||
|
///
|
||||||
|
/// Use of this source is governed by a BSD-style
|
||||||
|
/// licence that can be found in the LICENCE file or at
|
||||||
|
/// https://www.practically.io/copyright/
|
||||||
|
/// </copyright>
|
||||||
7
site-modules/core/files/emacs/snippets/csharp-mode/prop
Normal file
7
site-modules/core/files/emacs/snippets/csharp-mode/prop
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Class property
|
||||||
|
# contributor: Ade Attwood <code@adeattwood.co.uk>
|
||||||
|
# key: prop
|
||||||
|
# uuid: prop
|
||||||
|
# --
|
||||||
|
public ${1:int} ${2:Name} { get; set; }${3: = ${4:"Default"}}$0
|
||||||
11
site-modules/core/files/emacs/src/lang/c-sharp.el
Normal file
11
site-modules/core/files/emacs/src/lang/c-sharp.el
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
;;; c-sharp.el --- AMACS -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright 2021 Practically.io All rights reserved
|
||||||
|
;;
|
||||||
|
;; Use of this source is governed by a BSD-style
|
||||||
|
;; licence that can be found in the LICENCE file or at
|
||||||
|
;; https://www.practically.io/copyright/
|
||||||
|
|
||||||
|
(use-package csharp-mode
|
||||||
|
:ensure t
|
||||||
|
:hook (csharp-mode . lsp-deferred))
|
||||||
Loading…
Reference in a new issue